I understand the reasoning behind the path limitations on the !WriteKeyValue bang to keep a skin from messing up other programs or data outside of its purview.
But , that is exactly what I'm trying to accomplish. Is there any way to overcome these limitations, change a file outside of the scope of the Rainmeter application. I know I could go through lua to access the file, but then I would need to read the file, parse for the single item I need to change, then write the file back. It would be so much easier to use this bang as the file I am trying to change is exactly setup as an ini file even though it is for another program.
Thanks for any help.
It is currently March 19th, 2024, 7:30 am
!WriteKeyValue how to overcome filepath limitations
-
- Posts: 10
- Joined: April 21st, 2013, 1:46 pm
!WriteKeyValue how to overcome filepath limitations
Last edited by LordgodEric on November 7th, 2019, 12:33 pm, edited 1 time in total.
Re: !WriteKeyValue how to overcome filepath limitations
Just an idea. How about creating hardlink for the "outside" file?
Command to make hardlink is fsutil hardlink create (link filepath) (target filepath).
I have actually tested this method, and confirmed that !WriteKeyValue bang can write value to the *.inc file located "outside" of #SKINSPATH# and #SETTINGSPATH#.
Command to make hardlink is fsutil hardlink create (link filepath) (target filepath).
I have actually tested this method, and confirmed that !WriteKeyValue bang can write value to the *.inc file located "outside" of #SKINSPATH# and #SETTINGSPATH#.
Re: !WriteKeyValue how to overcome filepath limitations
Oops...sorry, Windows hardlink has some limitations and problems (at least for me). "Symbolic link" seems to me far better.
Command for making symbolic link is mklink (link filepath) (taget filepath).
Command for making symbolic link is mklink (link filepath) (taget filepath).
-
- Posts: 10
- Joined: April 21st, 2013, 1:46 pm
Re: !WriteKeyValue how to overcome filepath limitations
Thanks so much the symbolic link worked perfectly. Just needed to read the full info on the command to figure exactly how to do it. https://ss64.com/nt/mklink.html. And most important the command had to be issued from one of the folders (I used the #SKINSPATH#) and then link through that path in the code.