Hi guys i figured out how to modify the system path. Do i need to do anything special to have this run at logon? thanks.
Code:
Dim ExistingPath, NewPath
Set objShell = WScript.CreateObject("WScript.Shell")
Set objEnv = objShell.Environment("SYSTEM")
'==========================================================================
' Add your Path Entry Here
'==========================================================================
ExistingPath = objEnv("PATH")
WScript.Echo ExistingPath
If InStr(1, ExistingPath, "c:\msys\1.0\bin;c:\usr\local\cell\host-win32\bin;c:\usr\local\cell\host-win32\ppu\bin;c:\usr\local\cell\host-win32\spu\bin;c:\usr\local\cell\host-win32\Cg\bin", VBTextCompare) Then
WScript.Echo("Path already modified")
WScript.Quit
Else
NewPath = ExistingPath & ";" & "c:\msys\1.0\bin;c:\usr\local\cell\host-win32\bin;c:\usr\local\cell\host-win32\ppu\bin;c:\usr\local\cell\host-win32\spu\bin;c:\usr\local\cell\host-win32\Cg\bin"
objEnv("PATH") = NewPath 'WRITE NEW PATH, INCLUDING OLD ONE
WScript.Echo NewPath
End If