Registry values with a \ in it
Posted: Tue Oct 27, 2015 7:33 pm
I want to set an application to run as Administrator so I have the following code:
but then it creates a subkey c: and another subkey windows and then just test.exe and runasadmin
The following works correctly, but I need the full path to the .exe
I know the problem must be the backslashes in "c:\windows\test.exe" but how do I go about getting it in there?
Thanks,
Carel
Code: Select all
put "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\c:\windows\test.exe" into myRegSetting
get setRegistry(myRegSetting, "RUNASADMIN")
The following works correctly, but I need the full path to the .exe
Code: Select all
put "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\test.exe" into myRegSetting
get setRegistry(myRegSetting, "RUNASADMIN")
Thanks,
Carel