Here is how I do it in mine:
Set WshProcessEnvironment = oShell.Environment("Process")
'_____________________________________________________________________
'Set Environment Variables
EnvWinDir = WshProcessEnvironment("windir") 'Windows Directory
EnvTempDir = WshProcessEnvironment("Temp") 'Temp Directory
EnvOpSystem = WshProcessEnvironment("OS") 'OS Type
EnvUsername=WshProcessEnvironment("Username") 'Username
EnvComputerName=WshProcessEnvironment("computername") 'Computername
If EnvOpSystem="Windows_NT" Then
'20
EnvAppData=wshprocessenvironment("appdata") 'Application Data
EnvProgFiles=wshProcessEnvironment("ProgramFiles") 'Program Files
EnvSystemDrive=wshprocessenvironment("systemdrive") 'System Drive
Else
EnvAppData=Envwindir&"\applic~1"
EnvProgfiles=left(Envwindir, 2)&"\progra~1"
EnvSystemDrive=left(Envwindir, 2)
End if
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Chris Levis
Sent: Wednesday, December 04, 2002 9:39 AM
To: NT 2000 Discussions
Subject: Setting Env't variable from VBS login script
Hm. Anyone know how I can set a system environmental variable using VBS
or Jscript? I'm working (slowly) on moving my kixtart to VBS. It's
simple matter to /see/ existing variables, but not to set new ones.
I've calling a shell and sending it a "set THING=STUFF", but that only
keeps the variable for the duration of the script...
Any ideas or pointers?
Thanks!
_______________________
There are 10 types of people in the world: those who understand binary,
and those who do not.
------
You are subscribed as [EMAIL PROTECTED]
Archives: http://www.swynk.com/sitesearch/search.asp
To unsubscribe send a blank email to %%email.unsub%%
------
You are subscribed as [email protected]
Archives: http://www.swynk.com/sitesearch/search.asp
To unsubscribe send a blank email to [EMAIL PROTECTED]