I found that there are a command to remove environment variables:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Environment("VOLATILE").Remove("NLS_LANG")
I can not find a method that adds og changes environment variables.
The new setting of the environment variable should apply to a program that
are to be executed from the same VBS-script; like this:
Return = wsh.Run("rwrun60.exe NLS_TEST.rep", 5, FALSE)
The new value of the environment variable do only have to apply to the
current session.
best regards
Morten D. Christensen
You was close :-)
This will set an env. var for the script and all it programs it calls (W9x/Me,
WNT/W2k), it will only apply to the
current session ("Process").
Set WshShell = CreateObject("WScript.Shell")
Set WshProcessEnv = WshShell.Environment("Process")
' Set your environment variable
WshProcessEnv("NLS_LANG") = "ENGLISH_AMERICA.WE8ISO8859P1"
Regards,
Torgeir
Thank you very much for your answer, it solved the problem.
Tak skal du have.
regards
Morten
"Torgeir Bakken" <Torgeir.B...@hydro.com> wrote in message
news:3B87DF30...@hydro.com...