[thelist] I have a small need...

Jeff Wilhelm thelist at summit7solutions.com
Wed Oct 6 15:26:43 CDT 2004


We do that here through VBS files; for example, this extract from our login
script:

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
'
' Set TEMP/TMP Drive on A Given Server
' For System and User Variables
'
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  Set objSHELL = CreateObject("WScript.Shell")
  Set objNET = CreateObject("Wscript.Network")

  strCompName = ucase(objNET.ComputerName)

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


' Suppress error messages (disable during debugging)
on error resume next 


'LUKE
 If strCompName = "LUKE" Then
  set oEnv=objSHELL.Environment("System")
   oEnv("TEMP") = "d:\temp"
   oEnv("TMP") = "d:\temp"
  set oEnv=objSHELL.Environment("User")
   oEnv("TEMP") = "d:\temp"
   oEnv("TMP") = "d:\temp"
 Else
  'Do nothing
 End If





Message from  at Wednesday, October 06, 2004 3:21 PM: 

> ...for a windows-based, cmd-line, JS file (or batch) that
> will modifiy the System Enviornmental Variables. 
> 
> Below is what I need created. Path needs to be appended.
> 
> Can ayone help?
> 
> Thanks
> 
> Walter
> 
> 
>   GPG          %usr-bin%
>   mySQL        U:\etc\mysql\bin\
>   p2x          U:\usr\local\p2x
>   path        
>  
>  
>  
>  
>  
>  
>  
>  
>  
> %perl%;%mySQL%;%p2x%;%PHPRC%;%usr-bin%;%UnixDOS%;%PHPRC%;
> perl         U:\usr\local\bin PERL5LIB    
> U:\usr\local\lib; G:\usr\local\site\lib; PERL5OPT    
> -MWild PHPRC        U:\etc\php TEMP         H:\TMP TMP   
> H:\TMP TZ           US/Central UnixDOS      U:\bin
> usr-bin      U:\usr\bin\      



More information about the thelist mailing list