cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
raygallo
Level 3

Environment Variable Help

I am trying to write the environment variable %PUBLIC% to an .ini file. in Windows 7

When I go to a DOS prompt and type SET,. I see PUBLIC=C:\Users\Public

Whn I type %PUBLIC% in a dos prompt I get C:\Users\Public

When I use [PUBLIC]Public Documents in the data value for the .ini file, it seems to completely ignore it at install time and I get just Public Documents written to the .ini file.

When I do [ALLUSERSPROFILE] i am able to get C:\ProgramData written to the .ini file which is what I get when I do a %ALLUSERSPROFILE% from a DOS prompt.

I seem to be a bit confused on how to get the variable PUBLIC to do the same thing.

Any insight is most appreciated.
Labels (1)
0 Kudos
(1) Reply
raygallo
Level 3

Nothing better than when you solve your own problem.

The solution is set the variable to [%PUBLIC] in the data value. 🙂

So simple, yet so elusive.
0 Kudos