Environment variable PATH in Windows Server 2008
In SYSTEM environment I have variable PATH with value "C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\ ..."
Now I want create new variable PATH in my USER environment with value "C:\Apps;%PATH%".
How to do it permanently?
I have tried (without success) next steps:
GUI: "System Properties" -> "Environment Variables..." -> field "User variables for ..." -> button "New.."Command-line:
set PATH=C:\Apps;%PATH%
setX PATH "C:\Apps;%PATH%"
PATH C:\Apps;%PATH%
Every time windows append my new value "C:\Apps" at the end of variable PATH or lost new (correct) value after I log off.
:-(
__________________________________________________________
If isn't above described anything, the following applies: Technical details: * OS: Windows Server v2008, English, Standard Edition, SP1 ** My User-Account is member of 'Administrators' local security group. * MS-SQL-Server: v2008-R2, English, Standard Edition,
SP1 ** My User-Account is member of 'SysAdmin' db-role.
August 23rd, 2012 11:37am
Now I am using next work around:
I have added new value "AutoRun" to key "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" with data "PATH=C:\Apps;%PATH%".
But it will work only in "Command Processor" windows.
It won't work for example in "Run" window.
:-(
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2012 3:18am
Hi,
I did a test in my lab, when I open "Environment Variables..." under System Properties, and then find the System variables
Path, and click edit, I am able to add c:\apps at the end of the variable.
After that, I log off and log on again, check the result, it is correct and the value was changed as what I did.
RegardsYan Li
TechNet Community Support
August 24th, 2012 3:36am
Yes, I agree.
But my problem is:
not in modification of SYSTEM variable. Because modification of SYSTEM variable influence all users on this computer.
I need influence this variable only in my USER environment.I need insert new value at begin of my environment variable PATH, not append at the end.
Thx.
:-)
__________________________________________________________ If isn't above described anything, the following applies: Technical details: * OS: Windows Server v2008-R2, English, Enterprise Edition, x64, SP1 ** My User-Account is member of 'Administrators'
local security group. * MS-SQL-Server: v2008-R2, English, Enterprise Edition, x64, SP1 ** My User-Account is member of 'SysAdmin' db-role.
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2012 4:05am


