clmowers,
Did a little rewrite of the code without the goto's and vars and macro's inside strings.
This is a untested rewrite cause I do not have your setup here.
Give it a go and let us know how it's doing.
Code:
;Opens the stingers.txt file, if it does not exist it is created (see manual on writeline).
Open (1, "\\mas90\scripts$\stinger.txt", 5)
$Y = "%temp%\stng259.exe"
Copy @ldrive + "\stng259.exe" $Y
If @error <> 0
;If it errors write this line to the stinger.txt file.
WriteLine (1, "Error copying stng259.exe to: " + $y)
?
EndIf
;Select the OS and run the appropriate code.
Select
;This is for WinXP.
Case @producttype = "Windows XP Professional"
$Y = "%temp%\start.bat"
Copy @ldrive + "\start.bat" $Y
If @error =0
Run "%temp%\start.bat"
Else
;If it errors write this line to the stinger.txt file.
WriteLine (1, "copy of start.bat to " + @wksta + "on " + @date + "Failed")
EndIf
;This is for Win98
Case @PRODUCTTYPE = "Windows 98"
$Y = "%temp%\start1.bat"
Copy @ldrive + "\start1.bat" $Y
If @error =0
Run "%temp%\start1.bat"
Else
;If it errors write this line to the stinger.txt file.
WriteLine (1, "copy of start1.bat to " + @wksta + "on " + @date + "Failed")
EndIf
EndSelect
;Close the stinger.txt file.
Close (1)
Edited by Mart (2006-01-09 09:24 PM)
_________________________
Mart
- Chuck Norris once sold ebay to ebay on ebay.