I'd like to be able to read an env var created in a .vbs with EnvGet without having to reboot.
Anyone know why I can read it right away in a .vbs and not with EnvGet
Thx!
$oShell = ObjCreate("WScript.Shell")
$wshSystemEnv = $oShell.Environment("SYSTEM")
$wshSystemEnv( "David" ) = "Bowie"
$var = EnvGet("David")
MsgBox(4096, "Path variable is:", $var)
MsgBox(4096, "Test", $wshSystemEnv("David"), 10)
Anyone know why I can read it right away in a .vbs and not with EnvGet
Thx!
$oShell = ObjCreate("WScript.Shell")
$wshSystemEnv = $oShell.Environment("SYSTEM")
$wshSystemEnv( "David" ) = "Bowie"
$var = EnvGet("David")
MsgBox(4096, "Path variable is:", $var)
MsgBox(4096, "Test", $wshSystemEnv("David"), 10)