#154826 - 2006-01-09 02:26 PM
What am I doing wrong
|
clmowers
Fresh Scripter
Registered: 2006-01-09
Posts: 13
|
Hello, Im new to scripting and Im having problems with a script I wrote. What Im trying to do is copy a file to some computer and then run that program. The issue that Im having is I have both 98 and xp machine. I can get the program to copy to both machine but cant get it to run on the 98. The xp machine seem to be fine. Here is a copy of my script. Can someone take a look and see what Im doing wrong. Thanks
debug on
;------------------------------------------------------------------------------------------ ;Copies Stng259.exe to local computer and runs script. Then send log of scan to mas90 ;------------------------------------------------------------------------------------------
$Y = "%temp%\stng259.exe" Copy @ldrive + "\stng259.exe" "$Y" if @error = 0 ; goto "product" else shell "%comspec% /c echo copy of stng259.exe to @wksta on @date Failed >> \\mas90\scripts$\stinger.txt GOTO "END" Endif
: product If @producttype = "Windows XP Professional" goto "XP" else goto "w98" endif
:w98 $Y = "%temp%\start1.bat" Copy @ldrive + "\start1.bat" "$Y" If @error =0 Run "%temp%\start1.bat" Else shell "%comspec% /c echo copy of start1.bat to @wksta on @date Failed >> \\mas90\scripts$\stinger.txt GOTO "end1" ENDiF :end1 cookie exit
:XP $Y = "%temp%\start.bat" Copy @ldrive + "\start.bat" "$Y" If @error =0 Run "%temp%\start.bat" Else shell "%comspec% /c echo copy of start.bat to @wksta on @date Failed >> \\mas90\scripts$\stinger.txt GOTO "end" endif :end cookie1 exit
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|