|
Answer» Is there any way to permanently Set an Environment Variable from within a BATCH script :-?.
if exist c:\windows set exist=yes
will set the variable but only for the DURATION of the current use of CMD or command, can it be used somehow to set the variable permanently :-?Environment variables are kept in the registry at: HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
I would imagine you can use reg add to get the value into the registry via batch. You can ALSO set variables with the environment object in a VBScript.
8-)You can use the SETX command from the Windows Resource Kit.
Download here: http://www.microsoft.com/downloads/details.aspx?familyid=DC2D3339-8F36-4FBA-A406-2A2A2AD7208C&displaylang=en
Info here: http://www.ss64.com/nt/setx.htmlThank you...
|