Page 1 of 1 1
Topic Options
#51038 - 2000-08-17 07:24 PM Apps and their scripts for installs
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
Here is a scriptlet for Mcafee Netshield. I left in my variables, but it is pretty straight forward.
code:

if @ras=0 and $admin=1 ;Do not run section if dialed up or not local admin on N
; ********************************** McAfee Netshield *******************************************
if existkey("HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\VirusScan")
? color r+/n " McAfee NetShield is not installed" color w/n
shell("$server\mcafee$$\$os\install\setup.exe -s")
endif
endif

[This message has been edited by Radimus (edited 17 August 2000).]

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#51039 - 2000-08-17 08:04 PM Re: Apps and their scripts for installs
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
Here is the section that configures and maintains Mcafee Netshield

code:

; ******************************* McAfee NetShield Section ***********************************

$McAfeeRegKey="HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\VirusScan"
$McAfeeEngKey="HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\VirusScan\Tasks\Upgrade"
$McAfeeAltKey="HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AlertManager\Recipients"
$HKLMSMVSDT="HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\VirusScan\McShield\CurrentVersion"
$prd=readvalue("$McAfeeRegKey", "szProductVer")
$eng=readvalue("$McAfeeRegKey", "szEngineVer")
$dat=readvalue("$McAfeeRegKey", "szVirDefVer")
$Mcdate=readvalue("$McAfeeRegKey", "szVirDefDate")
$mceng=READVALUE("$McAfeeEngKey", "szUpgradeCMD")
$mcexe=READVALUE("$McAfeeRegKey", "szUpdateEXE")
$datdir=readvalue("$McAfeeRegKey","DAT")
$scanner=readvalue("$McAfeeRegKey","scan32exe")
$exts=readvalue("$HKLMSMVSDT","szProgExts")
$runscan=0
$datupdate=0

$McEngine ="4.0.70"
$DatPath="$server"+"\mcafee$$\WinNT\Update"
$EngPath="$server"+"\mcafee$$\WinNT\Upgrade"

$95McAfeeDat="4.0.4080"
$95McEngine ="4.0.70"
$95DatPath="$server"+"\mcafee$$\Win95\Update"
$95EngPath="$server"+"\mcafee$$\Win95\Upgrade"

; ****************************** Default Program Extensions Section *****************************
; will scan for viruses with VB or SHS scripting

if instr("$exts","VB?")=0
$exts=$exts+" VB?"
$newexts=writevalue("$HKLMSMVSDT","szProgExts","$exts",REG_SZ)
$newexts=writevalue("$HKLMSMVSDT","szDefProgExts","$exts",REG_SZ)
$newexts=writevalue("$HKLMSMVSDT","bScanAllFiles","0",REG_DWORD)
endif

if instr("$exts","SHS")=0
$exts=$exts+" SHS"
$newexts=writevalue("$HKLMSMVSDT","szProgExts","$exts",REG_SZ)
$newexts=writevalue("$HKLMSMVSDT","szDefProgExts","$exts",REG_SZ)
$newexts=writevalue("$HKLMSMVSDT","bScanAllFiles","0",REG_DWORD)
endif

; ********************************** Upgrade Engine Section ***********************************
? " Installed "color c+/n"McAfee NetShield "color w/n"is version " color w+/n $prd color w/n " engine "color w+/n $eng color w/n
if $eng<$McEngine
$RET=WRITEVALUE("$McAfeeEngKey", "szUpdateUncLocation", "$EngPath", "REG_SZ")
$RET=WRITEVALUE("$McAfeeEngKey", "uUpdateFrom", "1", "REG_DWORD")
? color g+/n" The Antivirus Program on your computer is being updated" color w/n
shell "$engpath"+"\"+"$mceng"
$runscan=1
endif
; ********************************** Upgrade DAT Section ***********************************
? " Installed "color c+/n"McAfee DAT "color w/n"is version " color w+/n $dat color w/n " dated " color w+/n $Mcdate color w/n
$datver1=substr("$dat",5,4)
$datver2=substr("$dat",3,4)
if instr("$datver1",".")=0
$datver=$datver1
else
$datver=$datver2
endif
$datfile=dir("$datpath\dat*.zip")
while $datfile<>"" and @error=0 and $datupdate=0
$datfilever=substr("$datfile",5,4)
if $datfilever>$datver
? color g+/n" Updating Antivirus signatures" color w/n
$RET=WRITEVALUE("$McAfeeRegKey"+"\Tasks\Update", "szUpdateUncLocation", "$DatPath", "REG_SZ")
$RET=WRITEVALUE("$McAfeeRegKey"+"\Tasks\Update", "uUpdateFrom", "1", "REG_DWORD")
shell "$mcexe /task update"
$runscan=1
$datupdate=1
; ********************************* Alert Recipients Section *********************************
$Rep='Priority Level:"1" Type:"Network Message" Recipient:"\\'
$ret=writevalue("$McAfeeAltKey","Recipient0","$rep"+$dcsa+chr(34),"REG_SZ")
$ret=delvalue("$McAfeeAltKey","Recipient1")
endif
$datfile=dir()
loop
; ************************************* Extra DAT Section ************************************
$dattime=comparefiletimes("$datpath"+"\extra.dat","$datdir"+"extra.dat")
if $dattime=-3 or $dattime=1
shell("%comspec% /c net stop mcshield >nul")
copy "$datpath"+"\extra.dat" "$datdir"
if @error=0
? color g+/n " Extra Dat loaded" color w/n
$runscan=1
endif
shell("%comspec% /c net start mcshield >nul")
endif
; ********************************** Run Silent Scan Section **********************************
if $runscan=1
run ("$scanner"+" /uinone /clean /delete /exit")
? color g+/n " Starting Virus Scan" color w/n
endif


_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#51040 - 2000-08-24 10:19 PM Re: Apps and their scripts for installs
Anonymous
Unregistered


Here's a script for Acrobat Reader v4.05. Got burned with the .dll, so if you've already got an acrobat script, note the dll section...

BTW, how can I post and keep the code formatting?
-Scott

; ***********************************************************************
; Script Name: Updated By: When: Domains Affected:
; Acrob405.kix Scott Jones 08.15.2000 ACCTCOM, ACCTPD
; ***********************************************************************

cls
? ""

$HKLMS = "HKEY_LOCAL_MACHINE\SOFTWARE\Adobe"
$HKLMU = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
$SPECIFIC = "Acrobat 4.05 Installed"
$MsgBody = ""
$Data = ""
$Version = ""

; ************************************
; *** Looking for Full Acrobat 4.0 ***
; ************************************
$Temp = ReadValue("$HKLMU\Adobe Acrobat 4.0", "ProductID")
If @ERROR = 0
$Data = "4.0"
$SPECIFIC = "Acrobat 4.05 Script ABORTED -- Full Acrobat v$DATA Detected"
GOTO "CLEANUP2"
EndIf

; ***************************************
; *** Looking for Acrobat Reader 4.05 ***
; ***************************************
If ExistKey("$HKLMS\Acrobat Reader\4.0\AdobeViewer") = 0
$Data = "4.05"
$SPECIFIC = "Acrobat 4.05 Script ABORTED -- Acrobat Reader v$Data Already Installed"
GOTO "CLEANUP2"
EndIf

If Exist("C:\WINNT\System32\msvcrt.dll") = 1
$Version = GetFileVersion("C:\WINNT\System32\msvcrt.dll", "ProductVersion")
If $Version < 6
$Version = "Yes"
Else
$Version = "No"
EndIf
EndIf

Select
Case $Version = "Yes"
$MsgBody = "Your computer requires a two stage install, requiring a reboot after the 1st stage."
Case Exist("$SD\AcroTmp2.flg") = 1
GOTO "Start"
EndSelect

$msg = MessageBox("$FULLNAME,

It's time for another ESD update !

This distribution installs Adobe Acrobat Reader v4.05.
$MsgBody

Estimated Duration : 1 - 5 minutes
Reboot Required : $Version

Do you wish to Continue?", "Electronic Software Distribution System.", 4164)

If $msg = 7
$UPDATE_SCRIPT = "Acro405x"
$SPECIFIC = "User skipped Acrobat 4.05 ESD"
CALL "WriteLog.kix"
GOTO "SKIP_END"
EndIf

; ***********************************
; *** Verify MSVCRT.DLL is > v6.0 ***
; ***********************************
If $Version = "Yes"
RedirectOutput("$COM\status.txt",1)>nul
? "[message]"
? '"Preparring system for Adobe Acrobat Reader v4.05."'
? ""
? "[toc]"
? "2"
? '"Updating System"'
? '"Prepparing for Reboot"'
RedirectOutput("$COM\status2.txt",1)>nul
? "0"
RedirectOutput("")
RUN "$COM\status.exe"
Sleep 1
Copy "$DISTRIB\$UPDATE_SCRIPT\MSVCRT.1" "C:\WINNT\System32\"
WriteValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager", "PendingFileRenameOperations", "\??\C:\WINNT\System32\MSVCRT.1|!\??\C:\WINNT\System32\MSVCRT.DLL|", "REG_MULTI_SZ")
Sleep 2
RedirectOutput("$COM\status2.txt",1)>nul
? "1"
RedirectOutput("")
Copy "$FLAG\AcroTmp2.flg" "$SD\"
$SPECIFIC = "Acrobat 4.05 -- MSVCRT.DLL Updated"
CALL "WriteLog.kix"
Sleep 1
RedirectOutput("$COM\status2.txt",1)>nul
? "2"
RedirectOutput("")
Sleep 2
Shutdown("", "ESD Shutdown", 0, 1, 1)
QUIT
EndIf

:Start
RedirectOutput("$COM\status.txt",1)>nul
? "[message]"
? '"Installing Adobe Acrobat Reader v4.05"'
? ""
? "[toc]"
? "4"
? '"Uninstalling old Acrobat Readers"'
? '"Copying Files"'
? '"Extracting Files"'
? '"Installing Acrobat 4.05"'
RedirectOutput("$COM\status2.txt",1)>nul
? "0"
RedirectOutput("")

RUN "$COM\status.exe"
Sleep 1

; *****************************
; *** Uninstall Acrobat 4.0 ***
; *****************************
If ExistKey("$HKLMU\Adobe Acrobat 4.0") = 0
$SPECIFIC = "$SPECIFIC" + " -- Acrobat 4.0 Uninstalled"
$temp = ReadValue("$HKLMU\Adobe Acrobat 4.0", "UninstallString")
$temp = "C:\WINNT\ISUNINST.EXE -y -a " + SubStr($temp, 23, Len($temp) - 22)
SHELL "$SYS $temp"
EndIf

; ******************************
; *** Uninstall Acrobat 3.01 ***
; ******************************
If ExistKey("$HKLMU\Adobe Acrobat Reader 3.01") = 0
$SPECIFIC = "$SPECIFIC" + " -- Acrobat 3.01 Uninstalled"
$temp = ReadValue("$HKLMU\Adobe Acrobat Reader 3.01", "UninstallString")
$temp = "C:\WINNT\uninst.exe -y -a " + SubStr($temp, 21, Len($temp) - 20)
SHELL "$SYS $temp"
EndIf

; *****************************
; *** Uninstall Acrobat 3.0 ***
; *****************************
If ExistKey("$HKLMU\Adobe Acrobat Reader 3.0") = 0
$SPECIFIC = "$SPECIFIC" + " -- Acrobat 3.0 Uninstalled"
$temp = ReadValue("$HKLMU\Adobe Acrobat Reader 3.0", "UninstallString")
$temp = "C:\WINNT\uninst.exe -y -a " + SubStr($temp, 21, Len($temp) - 20)
SHELL "$SYS $temp"
EndIf

If Exist("C:\Acrobat3") = 1
SHELL "$SYS rd C:\Acrobat3 /q/s"
EndIf
If Exist("C:\Program Files\Acrobat Reader") = 1
SHELL '$SYS rd "C:\Program Files\Acrobat Reader" /q/s'
EndIf
If Exist("C:\WINNT\Profiles\All Users\Start Menu\Programs\Adobe Acrobat") = 1
If Exist("C:\WINNT\Profiles\All Users\Start Menu\Programs\Adobe Acrobat\*.lnk") = 0
SHELL '$SYS rd "C:\WINNT\Profiles\All Users\Start Menu\Programs\Adobe Acrobat" /q/s'
EndIf
EndIf

; *********************************
; *** Copy Files to Local Drive ***
; *********************************
RedirectOutput("$COM\status2.txt",1)>nul
? "1"
RedirectOutput("")
Copy "$DISTRIB\$UPDATE_SCRIPT\$UPDATE_SCRIPT.rar" "$COM\temp\"

; ************************************
; *** Extract Files to Local Drive ***
; ************************************
RedirectOutput("$COM\status2.txt",1)>nul
? "2"
RedirectOutput("")
SHELL "$SYS $DISTRIB\UnRAR.exe x $COM\temp\$UPDATE_SCRIPT.rar $COM\temp\ >NUL"

; ****************************
; *** Install Acrobat 4.05 ***
; ****************************
RedirectOutput("$COM\status2.txt",1)>nul
? "3"
RedirectOutput("")
SHELL "$SYS $COM\temp\$UPDATE_SCRIPT\setup -s -f1$COM\temp\$UPDATE_SCRIPT\setup.iss"

WriteValue("$HKLMS\Acrobat Reader\4.0\AdobeViewer", "BrowserIntegration", "0", "REG_DWORD")
DelValue("HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/pdf", "CLSID")
WriteValue("$HKLMS\Acrobat Reader\4.0\AdobeViewer", "EULA", "1", "REG_DWORD")

; *************************************
; *** Copying Flag and Writing Logs ***
; *************************************
:CLEANUP2
CALL "WriteLog.kix"
Copy "$FLAG\$UPDATE_FLAG.flg" "$SD\"
If $DATA = ""
RedirectOutput("$COM\status2.txt",1)>nul
? "4"
RedirectOutput("")
Sleep 2
EndIf

:SKIP_END
RETURN

[This message has been edited by morbid (edited 24 August 2000).]

Top
#51041 - 2000-08-25 09:15 AM Re: Apps and their scripts for installs
Anonymous
Unregistered


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).]

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 857 anonymous users online.
Newest Members
JimDunn, fgarcia, Viginette, ManuvdWielNL, Sir_Barrington
17890 Registered Users

Generated in 0.078 seconds in which 0.058 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org