Brian wrote: ↑August 13th, 2022, 5:38 am
I might be wrong, but this
could be an issue with the quotes.
When reading an option that contains both a starting and ending quote, Rainmeter will strip them.
This means, that an option like this:
"mklink.exe" /d "%123456%\DDD" "#VarPath#", will end up looking like this to Rainmeter:
mklink.exe" /d "%123456%\DDD" "#VarPath# <<- Notice the starting and ending quotes are removed.
This really doesn't affect many options, but in some cases (like the Parameter/Program options in RunCommand), you
may need a starting and ending quote to remain instead of being stripped. So, you need to double quote that option. It is mentioned in the RunCommand docs
here (read the "Note" below the
Timeout option).
Something like this:
Parameter=""mklink.exe" /d "%123456%\DDD" "#VarPath#""
This might not solve your issue, but it is worth trying.
-Brian
Thank you for the answer.
After a few tries, I started to think that the problem was caused by permission. (with Powershell)
Code: Select all
Parameter=new-item -itemtype symboliclink -path "A:\1" -name "Deneme" -value "A:\Fot"
Outputfile
Code: Select all
new-item : Administrator privilege required for this operation.
At line:1 char:1
+ new-item -itemtype symboliclink -path A:\1 -name Deneme -value A:\Fot ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (A:\Fotos:String) [New-Item], UnauthorizedAccessException
+ FullyQualifiedErrorId : NewItemSymbolicLinkElevationRequired,Microsoft.PowerShell.Commands.NewItemCommand
and with cmd
Code: Select all
Parameter=""""mklink.exe" /d "A:\1" "A:\Fot""""
output
Code: Select all
Microsoft Windows [Version 10.0.19044.1889]
(c) Microsoft Corporation. Tm haklar sakldr.
A:\>More?
Can I get around this with lua or powershell script?
But I don't know much about both scripting languages
UPDATE:
I found the solution.
1.gpedit.msc
2.computer configuration
3.Security...
4.local policies
5.User...
6.Creating symbolic links => (Delete Administrator and Add Everyone) then log-out
sorry caps Turkish
13-08-2022 17_01_29-Yerel Grup İlkesi Düzenleyicisi.png
Then I created a lua script for creating a batch file
Code: Select all
function SymbolicWrite()
local targetLink = SKIN:GetVariable('DevDev')
local LinkLink = SKIN:GetVariable('LinkVar1')
local FileName = SKIN:MakePathAbsolute('SymbolicWrite.bat')
local CreateFile = io.open(FileName, 'w')
if not CreateFile then
print ('could not open ' .. FileName)
else
-- write the line
-- Firstly delete old Symbolic Folder then create new Symbolic Folder
CreateFile:write('rd "', LinkLink, '"', '\nmklink.exe /d ', '"', LinkLink, '"', ' ', '"', targetLink,'"')
-- close the file
CreateFile:close()
end
end
Result:
Code: Select all
rd "LinkLink"
mklink.exe /d "LinkLink" "targetLink"
You do not have the required permissions to view the files attached to this post.