Jump to content

Environment variable question


Recommended Posts

REGEDIT4

[HKEY_CURRENT_USER\Software\WinRAR\Interface\Themes]"ShellExtBMP"="D:\\Program Files\\WinRAR"

%programfiles% doesn't work for me in the reg file.....how can i change D:\\Program Files

Edited by maniaq
Link to comment
Share on other sites


You could try this instead!

REGEDIT4

[HKEY_CURRENT_USER\Software\WinRAR\Interface\Themes]
"ShellExtBMP"="%ProgramFiles%\\WinRAR"

Or using reg.exe

REG ADD HKCU\Software\WinRAR\Interface\Themes /V ShellExtBMP /T REG_EXPAND_SZ /D "%%ProgramFiles%%\WinRAR" /F

<Edit>

The above should be one single line

</Edit>

Edited by Yzöwl
Link to comment
Share on other sites

Yzöwl's reg add command runs fine on my machine, of course, when you run it in command line and not in a batch, you have to use just single not double %.

Wrong.

The double % allow to keep variable in registry with /t REG_EXPAND_SZ type. With one %, the value become hard coded. But in fact, it's not a problem if it's hard coded because after batch execution program files path doesn't change. I think the best solution it's batch file which pass hard coded path of program files to reg.exe.

REG ADD HKCU\Software\WinRAR\Interface\Themes /V ShellExtBMP /D "%ProgramFiles%\WinRAR" /F
Edited by sonic
Link to comment
Share on other sites

  • 2 weeks later...
Yzöwl's reg add command runs fine on my machine, of course, when you run it in command line and not in a batch, you have to use just single not double %.

Wrong.

The double % allow to keep variable in registry with /t REG_EXPAND_SZ type. With one %, the value become hard coded. But in fact, it's not a problem if it's hard coded because after batch execution program files path doesn't change. I think the best solution it's batch file which pass hard coded path of program files to reg.exe.

REG ADD HKCU\Software\WinRAR\Interface\Themes /V ShellExtBMP /D "%ProgramFiles%\WinRAR" /F

it worked..tnx

Link to comment
Share on other sites

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