Bryce, here's a part of the script. Maybe you see what's getting wrong.If the script is executed with the debugging option, the win2k-sub is being executed. It this is the first time the computer is installed, the first case-statement is true. All variables are assigned the values stated in the script, but the copy-command seems not to be executed. After that the install will fail (because there's no sp2.exe). Then the txt-file is made. After that the sub ie5.5 is executed and something happens like the sub before. I don't get it...
code:
Gosub win2k_sp2
Gosub ie5.5
Gosub deltemp
Gosub end
:win2k_sp2
$rebootTxtExist = Exist ("%systemroot%\install\reboot.txt")
$win2k_sp2TxtExist = Exist ("%systemroot%\install\win2k_sp2.txt")
Select
Case $rebootTxtExist = 0 And $win2k_sp2TxtExist = 0
$sp2CopyDir = "\\server\share\install\apps_install\sp2"
$sp2InstallDir = "%systemroot%\install\sp2"
$sp2CmdLine = "$sp2InstallDir\w2ksp2.exe -u -n -o -z";
If Exist ("%systemroot%\install\sp2") <> 0
If Exist ("$sp2InstallDir\w2ksp2.exe") = 0
Cls
"Copying Windows 2000 Service Pack 2..."
Copy "$sp2CopyDir\w2ksp2.exe" "$sp2InstallDir"
EndIf
EndIf
Cls
"Installing Windows 2000 Service Pack 2..."
Shell $sp2CmdLine
Shell "%comspec% /c echo Windows 2000 ServicePack 2 was installed on @DATE (YYYY/MM/DD) at @TIME > %systemroot%\install\win2k_sp2.txt"
Shell "%comspec% /c echo Computersystem: @WKSTA >> %systemroot%\install\win2k_sp2.txt"
Case $rebootTxtExist = 1 And $win2k_sp2TxtExist = 0
$sp2CopyDir = "\\server\share\install\apps_install\sp2"
$sp2InstallDir = "%systemroot%\install\sp2"
$sp2CmdLine = "$sp2InstallDir\w2ksp2.exe -u -n -o -z";
If Exist ("$sp2InstallDir\w2ksp2.exe") = 0
Cls
"Copying Windows 2000 Service Pack 2..."
Copy "$sp2CopyDir\w2ksp2.exe" "$sp2InstallDir"
EndIf
Cls
"Re-installing Windows 2000 Service Pack 2..."
Shell $sp2CmdLine
Shell "%comspec% /c echo Windows 2000 ServicePack 2 was re-installed on @DATE (YYYY/MM/DD) at @TIME > %systemroot%\install\win2k_sp2.txt"
Shell "%comspec% /c echo Computersystem: @WKSTA >> %systemroot%\install\win2k_sp2.txt"
Shutdown ("", "", 0, 1, 1)
EndSelect
Return
:ie5.5
$rebootTxtExist = Exist ("%systemroot%\install\reboot.txt")
$ie55TxtExist = Exist ("%systemroot%\install\ie55.txt")
Select
Case $rebootTxtExist = 0 And $ie55TxtExist = 0
$ieInstallDir = "\\server\share\install\apps_install\ie5.5\flat\win32\en"
$ieCmdLine = "$ieInstallDir\ie5setup.exe /R:N"
Cls
"Installing Internet Explorer 5.5..."
Shell $ieCmdLine
Shell "%comspec% /c echo Internet Explorer 5.5 was installed on @DATE (YYYY/MM/DD) at @TIME > %systemroot%\install\ie55.txt"
Shell "%comspec% /c echo Computersystem: @WKSTA >> %systemroot%\install\ie55.txt"
Case $rebootTxtExist = 1 And $ie55TxtExist = 0
$ieInstallDir = "\\server\share\install\apps_install\ie5.5\flat\win32\en"
$ieCmdLine = "$ieInstallDir\ie5setup.exe /R:N"
Cls
"Re-installing Internet Explorer 5.5..."
Shell $ieCmdLine
Shell "%comspec% /c echo Internet Explorer 5.5 was re-installed on @DATE (YYYY/MM/DD) at @TIME > %systemroot%\install\ie55.txt"
Shell "%comspec% /c echo Computersystem: @WKSTA >> %systemroot%\install\ie55.txt"
Shutdown ("", "", 0, 1, 1)
EndSelect
Return
:deltemp
Call "@LSERVER\netlogon\del_temp.kix"
Return
:end
Select
Case Exist ("%systemroot%\install\reboot.txt") = 0
;execute some code
Shell "%comspec% /c echo The computer was being rebooted on @DATE (YYYY/MM/DD) at @TIME > %systemroot%\install\reboot.txt"
Shutdown ("", "", 0, 1, 1)
Case Exist ("%systemroot%\install\reboot.txt")
;execute some other code
EndSelect
Return
Martijn