I'm trying to set some environment variables in a DOS (actually WinNT 4.0 cmd) shell. I know that changing the value in the ENVIRON variable does not pass the value back to the shell. I've tried using the system() command thusly,
sVar = "EnvTest"
sValue = "oldhat"
if (system("Set " sVar "=" sValue )!= 0) #Set var and check for error.
and
if (system("Set EnvTest=oldhat"!=0) #Set var and check for error.
Neither statement returns an error nor do they set the variable.
Any ideas?
TIA,
Mark Imagineer
sVar = "EnvTest"
sValue = "oldhat"
if (system("Set " sVar "=" sValue )!= 0) #Set var and check for error.
and
if (system("Set EnvTest=oldhat"!=0) #Set var and check for error.
Neither statement returns an error nor do they set the variable.
Any ideas?
TIA,
Mark Imagineer