Hey guys, Long time since I have needed your expertise.
I have a script that automats the installation and launching of a software client. Base on groups membership the script will either run a "browser" version or a "Win100" (old DOS style).
There seems to be a difference on how windows treats environment variables.
This works.
the bat file this runs is this.
This does not.
Could someone tell me if there is supposed to be a difference in how these are running other than the fact that one is launched via BAT file and the other soley in VBS?
Thanks
John Fuhrman
Thanks
John Fuhrman
Titan Global Services
I have a script that automats the installation and launching of a software client. Base on groups membership the script will either run a "browser" version or a "Win100" (old DOS style).
There seems to be a difference on how windows treats environment variables.
This works.
Code:
Sub Win100_Working()
' Run CORE Win100 Client
' Set path to Win100 executable
sExePath = "E:\Program Files\CoreDir\Core_Main\Config\BK" &_
strBank & "\corelogin.bat"
sSwitches = ""
If objFSO.FileExists(sExePath) Then
objShell.Run Chr(34) & sExePath & Chr(34) & " " & sSwitches, 3, False
Else
End If
End Sub
Code:
[highlight]SET SFWINIPATH=E:\PROGRA~1\CoreDir\Users\113$FR~1\BK113[/highlight]
IF EXIST "E:\Program Files\CoreDir\Core_Main\Config\BK113\OSGWSUPD.EXE" START /W "OSGWSUPD" /MIN "E:\Program Files\CoreDir\Core_Main\Config\BK113\OSGWSUPD.EXE"
IF NOT ERRORLEVEL 1 START E:\PROGRA~1\CoreDir\CORE_M~1\SYNERG~1\\dbl\bin\dbr.exe BIN:MNUMNU
This does not.
Code:
Sub Win100_Not Working()
[highlight]
Set WshSystemEnv = objShell.Environment("USER")
WshSystemEnv(SFWINIPATH) = "E:\PROGRA~1\CoreDir\Users\" & strUser &_
"\BK" & strBank
[/highlight]
' Run CORE Win100 Client
' Set path to Win100 executable
sExePath = "E:\PROGRA~1\CoreDir\CORE_M~1\SYNERG~1\dbl\bin\dbr.exe"
sSwitches = "BIN:MNUMNU"
If objFSO.FileExists(sExePath) Then
objShell.Run Chr(34) & sExePath & Chr(34) & " " & sSwitches, 3, False
Else
End If
End Sub
Could someone tell me if there is supposed to be a difference in how these are running other than the fact that one is launched via BAT file and the other soley in VBS?
Thanks
John Fuhrman
Thanks
John Fuhrman
Titan Global Services