WSH Forum
|
Author |
Thread:
Set Enviroment Variables |
|
4scriptomini
|
Set Enviroment Variables
Posted:
Friday, May 04, 2007 1:32 AM (PST)
|
|
I am having a hard time. Maybe someone can help me out.
I need to set a envirmoent variable and retrive by a cmd using %variable%. yes i have googled a lot...
the code:
Set objShell = WScript.CreateObject("WScript.Shell")
Set colUsrEnvVars = objShell.Environment("PROCESS")
colUsrEnvVars("TEMP") = "Upgraded"
Wscript.Echo ObjShell.ExpandEnvironmentStrings("%TEMP%")
then I go to cmd and and type echo %temp% and IT IS NOT the value I set!!!! HELP MEEEeeeee
|
|
|