October 29, 200718 yr I have installed Unlocker, and am attempting to hide the tray icon via a registry tweak.Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]"UnlockerAssistant"="\"C:\\Program Files\\Unlocker\\UnlockerAssistant.exe\" -H"However, I do not always install windows on the c: drive. I know that %ProgramFiles% is an environment variable, but I can't figure out how to incorporate that into the above registry code. I have tried many combinations with and without quote marks, but none has worked.Just so you can see, here is an example:Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]"UnlockerAssistant"="\"%ProgramFiles%\\Unlocker\\UnlockerAssistant.exe\" -H"So, you experts out there: How can I make this regtweak work no matter what drive windows is installed on? Edited October 29, 200718 yr by radigast
October 29, 200718 yr I think if you use an enviroment var in a run entry it has to be an expandable stringWindows Registry Editor Version 5.00"UnlockerAssistant"=hex(2):25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,\ 00,69,00,6c,00,65,00,73,00,25,00,5c,00,55,00,6e,00,6c,00,6f,00,63,00,6b,00,\ 65,00,72,00,5c,00,55,00,6e,00,6c,00,6f,00,63,00,6b,00,65,00,72,00,41,00,73,\ 00,73,00,69,00,73,00,74,00,61,00,6e,00,74,00,2e,00,65,00,78,00,65,00,20,00,\ 2d,00,48,00,00,00
October 29, 200718 yr Author Can you elaborate more on an expandable string? And how did you covert my registry entry into that hex code?
October 29, 200718 yr in regedit, right click, select New and then Expandable String Value type in the name of the field (UnlockerAssistant) then modify its value to %ProgramFiles%\Unlocker\UnlockerAssistant.exe -Hwhen you export it regedit exports it as hex to retain the data exactly as you entered it
October 29, 200718 yr There are easier ways. If you want to see what is happening, simply use hidden DOS commands with cWnd/cmdow...REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v UnlockerAssistant /t REG_SZ /d \"%ProgramFiles%\Unlocker\UnlockerAssistant.exe\"" -H" /F...or AutoIt...RegWrite ( "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "UnlockerAssistant", "REG_SZ", '"' & @ProgramFilesDir & '\Unlocker\UnlockerAssistant.exe" -H' ) Edited October 29, 200718 yr by CEoCEo
Create an account or sign in to comment