|
Answer» Hi there, does anybody know of an easy way to append the registry entry for a system variable?
I would like to create some sort of BATCH file or .REG file that will KEEP what's already in the system variable, but just add an entry to the end of it.
IE: OLD PATH: %SYSTEMROOT%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
WOULD LIKE TO ADD: O:\ORANT\BIN
NEW PATH: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;O:\ORANT\BIN
Is this at all possible? Without having to manually add the path through the Control Panel - System - Advanced.....
Thanks alot, http://support.microsoft.com/kb/310516
Not to sure but that MAY help ! you can add through the registry. here's a vbscript. Code: [Select]strKeyPath = "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path" Set objShell = CreateObject("WScript.Shell") strPath= objShell.RegRead(strKeyPath) strPath = strPath & ";c:\temp" objShell.RegWrite strKeyPath,strPath,"REG_SZ" WScript.Quit also, you can use reg command. type reg /? for usage.VB Script works perfectly. Thanks...
|