Jump to content

Recommended Posts

Posted (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 by radigast

Posted

I think if you use an enviroment var in a run entry it has to be an expandable string

Windows 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

Posted

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 -H

when you export it regedit exports it as hex to retain the data exactly as you entered it

Posted (edited)

There are easier ways. :hello:

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 by CEoCEo

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...