System variable %ProgramFiles% is not listed with the other variables and I want to change it (temporarily)
Posted on 2006-05-05
I am making batch files, telling the main script to put %PROGRAMFILES%
in the script. However, because my systems variable is %PROGRAMFILES%
and that is the environment I am doing this in - it is putting........
There instead of just.........
So I need to alter my system variable so that
%PROGRAMFILES% does not exist on my system,
only temporarily whilst I do this, then I will change
it back to normal again (%PROGRAMFILES%)
I have looked in Control Panel > System > Advanced (tab) > Environment Variables (button)
and under that window, it does not show %PROGRAMFILES% anywhere. "C:\Program Files"
is referred to along the line that simply says "Path". WHAT?! What the hell is that?
If I change that "Path" then it will mess up......
C:\ -- (%SYSTEMDRIVE%)
C:\Program Files -- (%PROGRAMFILES%) but I WANT TO mess this one up! Temporarily, of course!
ALL the above are under "Path".
Hmmmmmmmmmm, thats strange because I do not have the variable %PATH%
that controls 4 things, do I? I certainly hope not.
So where can I change %PROGRAMFILES% to something like %PROGRAM_FILES%
just whilst I create these files with %PROGRAMFILES% in then and not "C:\Program Files".
Its no use because Windows is not ALWAYS installed to a C drive.
In a lot of cases, especially corporate organisations, Windows might
be on any drive BUT the C drive, for security etc. I can't believe it just
puts the full path instead of the variable when I told it to put the variable!
It makes me MAD!
So, now I have to change MY environment variable on my system and
risk messing that up just to put %PROGRAMFILES% in?! Sheesh honestly,
unless anyone knows of a special character I can use but that is out of
the question, it means making all the scripts all over again :(