Here's a sub in our standard login-script that checks if an install is required:

code:

;############################################
;# SUB INSTALL
;############################################
:install
$netscape="0"
$nsuitrol="0"
$mcafee1="0"
$mcafee2="0"
$mcafee3="0"
$office="0"
$archie8="0"
$jdoc="0"
$acro_zip="0"

IF INGROUP ("netscape install") AND EXIST ("c:\program files\netscape\communicator\calendar\nscal32.exe")=0
$netscape="1"
ENDIF

IF INGROUP ("install nsuitrol") AND EXIST ("U:\netscape\prefs.js")=0
$nsuitrol="1"
ENDIF

IF INGROUP ("install office97") AND EXIST ("c:\program files\microsoft office\office\wdlees8.txt")=0
$office="1"
ENDIF

;IF INGROUP ("install mcafee") AND EXIST ("c:\winnt\silentmcf403.txt")=0
; $mcafee1="1"
;ENDIF

IF INGROUP ("install mcafee")AND EXIST ("c:\progra~1\networ~1\netshi~1\eng403.txt")=0
$mcafee2="1"
ENDIF

IF INGROUP ("install mcafee")AND EXIST ("c:\progra~1\networ~1\netshi~1\sdat4071.txt")=0
$mcafee3="1"
ENDIF

IF INGROUP ("archie8_users") AND EXIST ("c:\winnt\profiles\@userid\bureaublad\archie8.lnk")=0
$archie8="1"
ENDIF

IF EXIST ("C:\Program Files\Netscape\Communicator\Program\java\classes\jDocPrt.jar")=0
$jdoc="1"
ENDIF

IF EXIST ("C:\Program Files\adobe\acrobat 4.0\reader\acrord32.exe")=0
$acro_zip="1"
ENDIF

IF $netscape="1" OR $nsuitrol="1" OR $office="1" OR $mcafee1="1" OR $mcafee2="1" OR $mcafee3="1" OR $archie8="1" OR $jdoc="1" OR $acro_zip="1" CALL (@LDRIVE + "\" + $scriptmap + "\" + "InstallNT.kix") ENDIF
IF $netscape="2" OR $nsuitrol="2" OR $office="2" OR $mcafee1="2" OR $mcafee2="2" OR $mcafee3="2" OR $archie8="2" OR $jdoc="2" OR $acro_zip="2" EXIT ENDIF
:geeninstall

RETURN


And here's the script that get's called:

code:

SELECT
CASE $netscape="1"
GOSUB netscape
CASE $nsuitrol="1"
GOSUB nsuitrol
CASE $office="1"
GOSUB office
CASE $mcafee1="1"
GOSUB mcafee1
CASE $mcafee2="1"
GOSUB mcafee2
CASE $mcafee3="1"
GOSUB mcafee3
CASE $archie8="1"
GOSUB archie8
CASE $jdoc="1"
GOSUB jdoc
CASE $acro_zip="1"
GOSUB acro_zip
ENDSELECT
RETURN

;############################################
;# INSTALL NETSCAPE 4.5
;############################################
:netscape
MESSAGEBOX ("The new version of Netscape is being installed","Attention!",48,60)
RUN "F:\kixinstall\netscape_45\wcsetup.exe"
IF EXIST ("c:\winnt\profiles\" + @USERID + "\bureaublad\Netscape Communicator.lnk")=0
COPY ("F:\kixinstall\netscape_45\ikoon\*.*")("c:\winnt\profiles\" + @USERID + "\bureaublad\")
ENDIF
$netscape="2"
RETURN

;############################################
;# NETSCAPE 4.5 PROFILES
;############################################
:nsuitrol
COPY @LDRIVE\tools\gsar\gsar.exe c:\kix\
IF EXIST(c:\fullnm.txt) DEL c:\fullnm.txt ENDIF
OPEN (4,"c:\fullnm.txt",5)
WRITELINE (4,"@FULLNAME")
CLOSE (4)
SHELL '%comspec% /c c:\kix\gsar.exe -o -s:032 -r::032 "c:\fullnm.txt"'
OPEN (7,"c:\fullnm.txt")
$FULLNAAM = READLINE (7)
CLOSE (7)
MESSAGEBOX ("Op dit moment wordt netscape aangepast voor het gebruik van Netscape Mail en Netscape Calendar. Na deze installatie is het aan te raden om met netscape uw e-mail te ontvangen en te verzenden, dit omdat Eudora in de toekomst zal verdwijnen.","Netscape Update",48,90)
MD U:\NETSCAPE
MD C:\WINNT\NSCACHE
SHELL '%comspec% /c XCOPY /S /E F:\KIXINSTALL\NSUITROL\Default\*.* U:\NETSCAPE'
COPY F:\KIXINSTALL\NSUitrol\nsreg.dat C:\WINNT\
SHELL 'c:\kix\gsar -o -sNTLOGIN -r@USERID "U:\netscape\prefs.js"'
SHELL 'c:\kix\gsar -o -sNTFULLNAME -r$FULLNAAM "U:\netscape\prefs.js"'
DEL ("c:\winnt\profiles\" + @USERID + "\menu start\programma's\opstarten\eudora.lnk")
DEL c:\fullnm.txt
DEL c:\kix\gsar.exe
$nsuitrol="2"
RETURN

;############################################
;# INSTALL OFFICE 97
;############################################
:office
$answer=MESSAGEBOX("Installation of Office 97.
If you do not wish to install at this time - press cancel","Attention!",49,90)

IF $answer="2" GOTO NAINSTALL ENDIF
RUN ("@LDRIVE\Installbat\office97.bat")
COPY ("f:\kixinstall\office97nl\wdlees8.txt") ("C:\program files\microsoft office\office\")
:nainstall
$office="2"
RETURN

;############################################
;# INSTALL MCAFEE 4.03
;############################################
:mcafee1

COPY ("f:\kixinstall\mcafee_403\silentmcf403.txt") ("C:\winnt\")
RUN ("f:\kixinstall\engine403a\sumc.bat")
$mcafee1="2"
RETURN

:mcafee2
COPY ("f:\kixinstall\mcafee_403\eng403.txt") ("C:\progra~1\Networ~1\NetShi~1\")
RUN ("f:\kixinstall\mcafee_403\wcsetup.bat")
$mcafee2="2"
RETURN

:mcafee3
COPY ("f:\kixinstall\mcafee_403\sdat4071.txt") ("C:\progra~1\Networ~1\NetShi~1\")
RUN ("f:\kixinstall\mcafee_403\sdat4071.exe /silent")
$mcafee3="2"
RETURN

RETURN

;############################################
;# INSTALL ARCHIE8
;############################################
:archie8

COPY ("f:\kixinstall\archie8\archie8.lnk") ("c:\winnt\profiles\@userid\bureaublad")
$archie8="2"
RETURN

;############################################
;# INSTALL JDOC PRINTING T.B.V. NET-IT
;############################################
:JDOC

RUN "F:\kixinstall\JDocPrinting\wcsetup.exe"
$jdoc="2"
RETURN

;############################################
;# INSTALL Acrobat Reader & Winzip
;############################################
:acro_zip

RUN "F:\kixinstall\acro_zip\wcsetup.exe"
COPY ("f:\kixinstall\acro_zip\Acrobat Reader.lnk") ("c:\winnt\profiles\@userid\bureaublad")
COPY ("f:\kixinstall\acro_zip\Winzip.lnk") ("c:\winnt\profiles\@userid\bureaublad")
$acro_zip="2"
RETURN


[This message has been edited by Fuentez (edited 25 August 2000).]