Jump to content

registry question/problem


Recommended Posts

Posted

I've noticed that .reg file does NOT accept environment variables

as %APPDATA% or %SYSTEMDRIVE% or %PROGRAMFILES%

but it has ti be written fixed location

as C:\Program Files

which is freaking stupid considering that deployement of NT 6 can be automatic just as NT 5 was

so how do i bypass this ?

what if user chooses to install OS on F or G drive, then fixed path would be worthless...


Posted

Are you really sure that .reg files do not support them?

 

All this time believing that the REG_EXPAND_SZ type was about using those kind of (environment) variables.... :(

...did it change with 7? :unsure:

https://msdn.microsoft.com/en-us/library/windows/desktop/ms724884(v=vs.85).aspx

 

Look for any existing key with an environment variable in it's value and export it to a .reg file, you will find that it will come out in .reg as "hex(2)" and the value will be in a set of hex values. and of course there are suitable converters:

https://www.raymond.cc/blog/convert-windows-registry-hex-to-text/

 

 

jaclaz

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