We have to do regular updates to 2 programs that we are using that are version controlled. The problems we are running into is that the program's automatic updater is completely unreliable and won't work with the ad-hoc updates (the 2nd program) they put out which our users require. The second problem is the userbase sometimes doesn't bother to run the updates themselves and then they come calling. Getting tired of that
The end result is when an update or an Ad Hoc update comes out, I edit the strings in the vars in the kixtart script and when the users log in, they get greeted with the updater program only if they need the update or the ad-hoc update...I'm running Kixtart 3.62.
The 1st attempt at this was to set some Vars in a batch file and some dummy .txt files for the version control (if the .txt is current then skip update kinda thing) then run both the updates, if needed, and from this batch file that the Kixtart script called. That worked perfectly from NT. The problem was that under 9x, only the 1st program would execute, and the would completely forget about the second one. I also tried breaking the main update and ad-hoc updates into their own separate batch files and putting in a Sleep 60 line in between each batch file that Kixstart called and it would pick it up, but if the 1st program takes longer than 60 seconds to update (it varies between 10-60 seconds depending upon the machine/network traffic, etc) it still skips #2, or if it would finish in 10 seconds and the user sits there and waits which I know I'd get complaints about. I thought a Shell call would suspend the script until the program it calls ends?....
So, I tried to programmatically do it and skip the batch files altogether. Again, I can get NT to work, but now 9x doesn't do anything aside from setting the vars (via a shell call to WINSET which the 9x users have in their Windows Dirs)
I'll be the 1st to admit I'm not programmatically inclined so if someone could take a look at this and tell me what I am doing wrong or if there's a better way to do this I'd appreciate it.....
---portion of script for Update and AdHoc---
IF @INWIN="1"
SET "CURRENTVER=5001.txt"
SET "OLDVER=5000.txt"
SET "CURRENTUPDT=UPDT5001.exe"
IF EXIST (%WINDIR% + "\%CURRENTVER%")
GOTO "SKIP1"
ENDIF
DEL "%WINDIR%\%OLDVER%"
COPY "S:\UPDT\%CURRENTVER%" "%WINDIR%"
SHELL "S:\UPDT\%CURRENTUPDT%"
:SKIP1
SET "CURRENTAHVER=AH101b.txt"
SET "OLDAHVER=AH100n.txt"
SET "CURRENTAHUPDT=AH101b.exe"
IF EXIST (%WINDIR% + "\%CURRENTAHVER%")
GOTO "SKIP2"
ENDIF
DEL "%WINDIR%\%OLDAHVER%"
COPY "S:\UPDT\%CURRENTAHVER%" "%WINDIR%"
SHELL "S:\UPDT\%CURRENTAHUPDT%"
:SKIP2
ENDIF
IF @INWIN="2"
SHELL "%windir%\Winset CURRENTVER=5001.txt"
SHELL "%windir%\Winset OLDVER=5000.txt"
SHELL "%windir%\Winset CURRENTUPDT=UPDT5001.exe"
IF EXIST (%WINDIR% + "\%CURRENTVER%")
GOTO "SKIP3"
ENDIF
DEL "%WINDIR%\%OLDVER%"
COPY "S:\UPDT\%CURRENTVER%" "%WINDIR%"
SHELL "S:\UPDT\%CURRENTUPDT%"
:SKIP3
SHELL "%windir%\Winset CURRENTAHVER=AH101b.txt"
SHELL "%windir%\Winset OLDAHVER=AH100n.txt"
SHELL "%windir%\Winset CURRENTAHUPDT=AH101b.exe"
IF EXIST (%WINDIR% + "\%CURRENTAHVER%")
GOTO "SKIP4"
ENDIF
DEL "%WINDIR%\%OLDAHVER%"
COPY "S:\UPDT\%CURRENTAHVER%" "%WINDIR%"
SHELL "S:\UPDT\%CURRENTAHUPDT%"
:SKIP4
ENDIF
---End of portion---
Sorry for dumping a ton of code out, but I'm baffled. I switched the program order around and it will still only call the 1st program....it kind of looks like the login script just continues onto the end without stopping for the second program...Any ideas?
Thanks,
Mike Weitsen
[This message has been edited by mweitsen (edited 19 May 2000).]