Yah, setx works much better than the vbs commands. Really weird - oh well.
Thanks, Alex -----Original Message----- From: Chris Levis [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 02, 2003 12:40 PM To: NT 2000 Discussions Subject: RE: Environment Variables via logon script I had wads of trouble trying to manipulate an env't variable (for one of our license managers) here. It's vbscript, and I ended up shelling out to setx.exe (from the reskit), at the advice of another list member. Works. > -----Original Message----- > From: Roger Seielstad [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 02, 2003 3:08 PM > To: NT 2000 Discussions > Subject: RE: Environment Variables via logon script > > > Environment variables set in a command session exist only for > that command session - once cmd.exe stops running, the > changes are lost. > > You can control them with the WSH shell object: > > '~~~~~ > Set shell = CreateObject("wscript.shell") > Envion = shell.environment("System") > Envrion("Path") = envrion("Path") & ";c:\whatever" > '~~~~~~ > > That vbs code should do it for you, although I don't know for > sure, as I haven't tried it. > > > > ------------------------------------------------------ > Roger D. Seielstad - MCSE > Sr. Systems Administrator > Inovis - Formerly Harbinger and Extricity > Atlanta, GA > > > > -----Original Message----- > > From: Alex Do [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, January 02, 2003 2:49 PM > > To: NT 2000 Discussions > > Subject: Environment Variables via logon script > > > > > > How do you guys add entries to the PATH in Windows2000 from > your logon > > scripts (Win2Kpro clients)? > > > > We just got off Novell finally and our path entries aren't > > working in the > > command prompt. The funny thing is that programs have no > > problem with the > > path - just the command prompt. > > > > We the method in VBS from WSShell.Environment, but it seems > to have no > > effect on the command prompt paths. If we go into the GUI > and change > > the path, it works fine - but the last thing we want to do is do > > this by hand > > on all our machines!!! > > > > Thanks, > > Alex > > > > ------ > > 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.unsub%% > ------ 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]
