radigast Posted October 29, 2007 Posted October 29, 2007 (edited) 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, 2007 by radigast
PC_LOAD_LETTER Posted October 29, 2007 Posted October 29, 2007 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
radigast Posted October 29, 2007 Author Posted October 29, 2007 Can you elaborate more on an expandable string? And how did you covert my registry entry into that hex code?
PC_LOAD_LETTER Posted October 29, 2007 Posted October 29, 2007 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
CEoCEo Posted October 29, 2007 Posted October 29, 2007 (edited) 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, 2007 by CEoCEo
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now