How about this?

Server-side:

code:
break on
:prog1
shell "%comspec% /c Waitfor prog1 > CPID.txt"
$ok = open (1,"CPID.txt")
$line = READLINE(1)
$ok = Close (1)
$computer = SUBSTR($line,23,LEN($line)-23)
shell "%comspec% /c Waitfor -s " + $computer
? "spawning sheduletask for " + $computer
Run "wkix32.exe prog1.kix " + "$$computer=" + $computer
Goto Prog1

prog1.kix
code:
shell 'jt.exe /sm \\' + $computer + ' /sj ApplicationName="\\server\share\VirusScan\setup.exe" Parameters="-s" /sc administrator password /saj prog1.job /rj /sd prog1.job'
:testdone
sleep 10
If READVALUE("HKLM\SOFTWARE\Network Associates\VirusScan","bVshieldEnabled") = 1
shell "%comspec% /c waitfor -s " + $computer
Else
Goto Testdone
Endif

Client Side:
code:
:installprog1
shell "waitfor -s prog1"
shell "waitfor -t 3 @WKSTA"
If @error <> "" goto installprog1
Else
? "Installing McAfee VirusScan. This will take a few minutes. Please wait..."
Shell "Waitfor @WKSTA"
Endif

The main problem I see with this code is that I'm unsure how to detect if the installation is complete. I am trying to detect if VirusScan is running, however there should be a better way.
Does anyone see any other problems with this code?

Brian
(obviously more error checking needs to be done.. what if install fails? but.. i'm just trying to get a basic framework for now)

[ 07 May 2002, 17:16: Message edited by: BrianTX ]