jg
2005-11-30 20:46:45 UTC
I tried the example from the script help
Dim WshShell, WshEnv
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshEnv = WshShell.Environment("USER") ' I replaced PROCESS with USER
hoping for better result
WshEnv("TestVar") = "Windows Script Host"
However when the script finishes, there is no TestVar around in the dos
prompt that executed the script..
I only need the set an environment variable just for the DOS prompt session.
Dim WshShell, WshEnv
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshEnv = WshShell.Environment("USER") ' I replaced PROCESS with USER
hoping for better result
WshEnv("TestVar") = "Windows Script Host"
However when the script finishes, there is no TestVar around in the dos
prompt that executed the script..
I only need the set an environment variable just for the DOS prompt session.