Sign in to follow this  
Followers 0
ronaldvr

Unattended install script

8 posts in this topic

Hi,

A few months ago I was involved in a discussion on installing software with no user interaction to facilitate clean installations.

It is more or less finished now, so I can give it to the community.

One nice addition would be a GUI to customize the installations.

How it works:

On a windows installation CD, there is the following sctructure:

\$OEM$\$1\Script

This directory contains all the files tu run the script(s) This directory will be copied to the drive windows is installed on (hence the %SYSTEMDRIVE% in the next commands)

The core is of course the autoit script. I start it with a batch file called RunMe.Bat that contains the line:

START %SYSTEMDRIVE%\Script\AutoIt3 %SYSTEMDRIVE%\Script\Install.AU3 %SYSTEMDRIVE%\Script\Software.ini NL

In this way it can be started from an unattended install script (a WINNT.SIF), by calling the batch file as follows:

[GuiRunOnce]
    Command4="XCOPY A:\*.* %SYSTEMDRIVE%\Script /s /y /r"
    Command8="%SYSTEMDRIVE%\Script\RunMe.Bat"

The "xcopy" line makes it possible to make late additions and changes to the scripts.

The script makes use of 2 commandline parameters, the first one is an .ini structured file that will be explained later, the second one is an optional Language parameter.

The Ini file controls which software is installed, and in which order. The structure is as follows:

[NumberOfRuns]

tells how often to reboot. This since some software (like DirectX, IE, and motherboard drivers need a reboot before other software can be installed)

[FirstRun]

[secondRun]

[ThirdRun]

....

Tells the script what to install during that run (comma separated list). The names you enter must correspond to an Ini header later in the file, eg

SoftwareToDo=Program1, Program2

THere are 2 entries, SoftwareToDo and Sleeptime, The sleeptime parameter determines how long the script waits after the last command before rebooting (important on older and slower machines)

[Program1]

Header that corresponds to the program you want to install. THere are the following entries:

ProgName=

The name that is displayed in the message window

Install=

Yes or No

Languages=

The possible languages for the installation No entry defaults to EN

Commands=

The number of commands in this section

??FP[n]=

The path to the file required

??CMD[n]

The command to run

The ?? stands for the language parameter, eg for Dutch it would read:

NLFP and NLCMD

The [n] tells the number of the command (if more than 1)

ProcWaitFor=

The name of the process to wait for to determine the end of the installation process

Image=

The image to display next to the text

TempDir=

The directory to use as temporary (for instance when unpakcing files for a subsequent command)

Example for Acrobat 5.1:

[Acrobat5]
ProgName=Acrobat Reader 5.1
Commands=2
Install=Yes
Languages=NL,EN
NLCMD1=""%PROGRAMFILES%\WinRAR\winrar" x %CDROM%\Inst\NL\AcRead51.rar "%SYSTEMDRIVE%\Script""
NLCMD2=%SYSTEMDRIVE%\Script\AcrRead51\setup -s
ENCMD1=""%PROGRAMFILES%\WinRAR\winrar" x %CDROM%\Inst\EN\AcRead51.rar "%SYSTEMDRIVE%\Script""
ENCMD2=%SYSTEMDRIVE%\Script\AcrRead51\setup -s
NLFP1=\Inst\NL\AcRead51.rar
NLFP2=%SYSTEMDRIVE%\Script\AcrRead51\setup
ENFP1=\Inst\EN\AcRead51.rar
ENFP2=%SYSTEMDRIVE%\Script\AcrRead51\setup
TEMPDIR=%SYSTEMDRIVE%\Script\AcrRead51
Image=3422.bmp
Comment=Acrobat Reader voor het lezen van PDF Bestanden
ProcWaitFor=_IsDel.Exe

The script assume that if no drive letter is entered on the CMD and FP entries, the drive from which the windows installation was done is used (If thsi CD is not in the CDROM, processing will abort in the current version)

The script puts an RvrSW.INI file in the %temp% directory, that contains resultcodes and errors.

The script and the Software.inii that I currently use are below:

SCRIPT (install.au3)

$InstPrefLang="NL"
$InstDrv="0"
$IniFileName="A:\SoftWare.ini"
$SysDrive=EnvGet("SystemDrive")

;Commandline parameters may include the preferred language (2 letter abbreviation)
;and the name of the software file
$Parms=""
If $CmdLine[0]> 0 Then
  For $I = 1 to $CmdLine[0]
      $Parms=$Parms & " " & $CmdLine[$I]
      If StringLen($CmdLine[$I]) > 2 Then
         $IniFileName=$CmdLine[$I]
      Else
         $InstPrefLang=$CmdLine[$I]
      EndIf
   Next
EndIf

;Get the CDROM drive Windows was installed from and should contain additional software to install
$CD = DriveGetDrive("CDROM")
For $I=1 to Number($CD[0])
   $pa = $CD[$I] & "\SPNOTES.HTM"
   If FileExists($pa) Then
    $instDrv=$CD[$I]
   Endif
Next
If $InstDrv="0" Then
   exit
Endif
EnvSet("CDROM", $InstDrv)

;Further addition could be a networkdrive to search for, but better would be to include in
;the'software.ini', an extra variable called FilePath, that specifies the absolute path if different
;from the CDROM, and the path and filename on the CD, so that a check can be made if the file exists
;before running the command (also enables failsafe operation of the script)


;Create if necessary, and write to log file
;Usage: See in which 'run' we are, additionally write errors during installation

$LogFile=EnvGet("TEMP") & "\RvRSW.INI"

Do
   If FileExists($LogFile) Then
      $CurrentRun=IniRead( $LogFile, "Run", "Now", "0")
   Else
      $Fnum = FileOpen($LogFile,2)
      FileWriteLine( $FNum, ";Logfile for Additional Installations")
      FileClose( $FNum)
      $CurrentRun=0
    Endif
    IniWrite($LogFile, "Run", "Now", $CurrentRun+1)

    Select
       Case $CurrentRun = 0
           $tmpSection=""
           $Section="FirstRun"
       Case $CurrentRun = 1
           $tmpSection="FirstRun"
           $Section="SecondRun"
       Case $CurrentRun = 2
           $tmpSection="SecondRun"
           $Section="ThirdRun"
       Case $CurrentRun = 3
           $tmpSection="ThirdRun"
           $Section="FourthRun"
       Case $CurrentRun = 4
           $tmpSection="FourthRun"
           $Section="FifthRun"
       Case $CurrentRun = 5
           $tmpSection="FifthRun"
           $Section="SixthRun"
    EndSelect

   ;Delete temporary directories from previous run
    $tmpToDel=IniRead( $LogFile, "TmpPaths", $tmpSection, "")
    $tmpToDel=StringReplace($tmpToDel, "%PROGRAMFILES%", @ProgramFilesDir)
    $tmpToDel=StringReplace($tmpToDel, "%WINDIR%", @WindowsDir)
    $tmpToDel=StringReplace($tmpToDel, "%SYSTEMDRIVE%", $SysDrive)

    $PathArr=StringSplit($tmpToDel, ",")

    $PaHi=$PathArr[0]
    If StringLen( StringStripWS($PathArr[1], 3) ) = 0 Then
       $PaHi=0
    endif
    If $PaHi > 0 Then
        $k=1
    While $k<=$PaHi
          $strDirDel=$PathArr[$k]
          DirRemove($strDirDel, 1)
          $k=$k+1
        Wend
    endif
   ;Get the number of runs from the ini file
    $NbrRuns=IniRead($IniFileName, "NumberOfRuns", "Runs", "0")

   ;Get the list of software to install on this run
    $SwToDo=IniRead($IniFileName, $Section, "SoftWareToDo", "Not Found")
    $SleepTime=IniRead($IniFileName, $Section, "SleepTime", "9999")
    $SWArr=StringSplit($SwToDo, ",")

    $SWHi=$SWArr[0]
    If StringLen( StringStripWS($SWArr[1], 3) ) = 0 Then
       $SWHi=0
    endif

Until $SWHi>0


;Create Registry Keys to run on next boot
If $NbrRuns > $CurrentRun Then
   RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx", "Title", "REG_SZ", "The Status dialogue won't be displayed because of Flags.")
   RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx", "Flags", "REG_DWORD", "136")
   $RgKey="||" & @ScriptDir & "\RunMe.Bat"
   RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\ZZZZ", "Step01", "REG_SZ", $RgKey)
Else
  Exit
Endif

ProgressOn("Additional Software Installations (Run " & $CurrentRun & " of "  & $NbrRuns & ", Please Wait...", "Installing... " & $SWArr[1], "", 0, @DesktopHeight - 150, 2)

For $I = 1 to $SWHi

    $DoInstall = IniRead( $IniFileName, $SWArr[$I], "Install", "No")
    If $DoInstall = "Yes" Then
       $Comment = IniRead( $IniFileName, $SWArr[$I], "Comment", "")
       $ProgName = IniRead( $IniFileName, $SWArr[$I], "ProgName", $SWArr[$I])
       ProgressSet( $I/$SWHi*100, $Comment , "Installing..." & $ProgName)
       $Img = IniRead( $IniFileName, $SWArr[$I], "Image", "Not Found")
       If $Img <> "Not Found" Then
          If FileExists(@scriptdir & "\" & $Img) Then
             SplashImageOn("", @scriptdir & "\" & $Img, 25, 25, 274, @DesktopHeight - 128, 1)
          else
             IniWrite($LogFile, $SWArr[$I], "FileNotFound", $Img)
          endif
       Endif
       $InstLang = IniRead( $IniFileName,$SWArr[$I],"Languages", "EN")
       $LangArr=StringSplit($InstLang, ",")
       $LangHi=$LangArr[0]
       $PrefLangFound=1
       If $LangHi>1 Then
          For $J = 1 to $LangHi
            If $InstPrefLang=$LangArr[$J] Then
               $PrefLangFound=$J
            EndIf
         Next
       EndIf
       $NumCommands=IniRead( $IniFileName,$SWArr[$I], "Commands", "1")
       For $J = 1 to $NumCommands
           If $NumCommands = 1 Then
              $CMPref=""
           Else
              $CMPref=String($J)
              $TmpPath=IniRead( $IniFileName, $SWArr[$I], "TEMPDIR", "Not Found")
              If $TmpPath<>"Not Found" Then
                 $tmpWrite=IniRead( $LogFile, "TmpPaths", $Section, "")
                 if $tmpWrite = "" Then
                    $tmpWrite = $TmpPath
                 else
                    $tmpWrite = $tmpWrite & "," & $TmpPath
                 endif
                 IniWrite($LogFile, "TmpPaths", $Section, $tmpWrite)
               endif
           Endif
           $FilePath=IniRead( $IniFileName, $SWArr[$I], $LangArr[$PrefLangFound] & "FP" & $CMPref, "Not Found")
           If $FilePath<>"Not Found" Then
              $FilePath=StringReplace($FilePath, "%PROGRAMFILES%", @ProgramFilesDir)
              $FilePath=StringReplace($FilePath, "%WINDIR%", @WindowsDir)
              $FilePath=StringReplace($FilePath, "%SYSTEMDRIVE%", $SysDrive)
              If (StringInStr(StringLeft($FilePath, 2), ":")>0 ) OR ( StringLeft($FilePath, 2) = "\\") Then
                ;FilePath is Absolute, do Nothing
              Else
                 $FilePath=$InstDrv & $FilePath
              EndIf
              IniWrite($LogFile, $SWArr[$I], "Filetorun" & $CMPref, $FilePath)
              If FileExists($FilePath) Then
                 $RunCMD = IniRead( $IniFileName,$SWArr[$I], $LangArr[$PrefLangFound] & "CMD" &$CMPref, "")
                 $RunCMD=StringReplace($RunCMD, "%CDROM%", $InstDrv)
                 $RunCMD=StringReplace($RunCMD, "%PROGRAMFILES%", @ProgramFilesDir)
                 $RunCMD=StringReplace($RunCMD, "%WINDIR%", @WindowsDir)
                 $RunCMD=StringReplace($RunCMD, "%SYSTEMDRIVE%", $SysDrive)
                 $Process=IniRead( $IniFileName,$SWArr[$I],"ProcWaitFor", "Not Found")
                 If StringInStr( $RunCMD, "AutoIt3") > 0 Then
                    $RunCMD = $RunCMD & " " & $FilePath
                 Endif
                 $ExCode=RunWait( $RunCMD )
                 IniWrite($LogFile, $SWArr[$I], "CommandExecuted" & $CMPref, $RunCMD & " ExitCode = " & $ExCode)
                 If $Process<>"Not Found" Then
                    ProcessWaitClose( $Process )
                 EndIf
              Else
                IniWrite($LogFile, $SWArr[$I], "FileNotFound" & $CMPref, $FilePath)
              EndIF
          EndIf
        Next
        SplashOff()
     EndIf
Next
If $SleepTime=9999 Then
   exit
else
   ProgressSet( 100, "Waiting to reboot..." , "Waiting " & $SleepTime & " to finish processes")
   $SleepTime = $SleepTime*1000
   Sleep($Sleeptime)
endif

ShutDown(6)

SOFTWARE.INI

[NumberOfRuns]
Runs=4

[FirstRun]
SoftwareToDo=TourDisable,SisAGP,ViaChipSet
Sleeptime=60

[SecondRun]
SoftwareToDo=WinRar,Indeo,TightVNC,W2KSupport,AppCompat,PageDefrag,Junction,Mozilla,DivX,AccessRunTi

me,IE6
Sleeptime=300


[ThirdRun]
SoftwareToDo=RealPlayer8,RealPlayerGold,WinAmp,MediaPlayer7,MDAC,SunJava,Acrobat5,Acrobat6,MediaPlay

er9,StdRegSettings,HerstVerbergPC,DirectX90b
Sleeptime=300

[FourthRun]
SoftwareToDo=MSCOMCTL,MyODBC,VBRuntimeSP5,OO11,QuickTime,MacroMedia,SpyBot,FreshDiagNose,CDEX,IrfanV

iew,RecoveryConsole,HFPRESP5
SleepTime=300

[TourDisable]
Install=Yes
ENCMD=regedit /s %Systemdrive%\Script\IntroScreen.reg
Languages=EN
ENFP= %Systemdrive%\Script\IntroScreen.reg


[ViaChipSet]
ProgName=Via Chipset Drivers
Install=Yes
Languages=EN
ENCMD=%CDROM%\Via4in1\Setup -b -s
ENFP=\Via4in1\Setup.exe
Comment=Versie 4in1 v4.51

[SisAGP]
ProgName=Sis AGP Driver
Install=No
ENCMD=%SYSTEMDRIVE%\drivers\agp115\setup -s
ENFP=%SYSTEMDRIVE%\drivers\agp115\setup.exe
Languages=EN
Comment=Versie 1.15

[DirectX90b]
Commands=2
ProgName=DirectX 9.0b
Install=Yes
Languages=EN
ENCMD1=""%PROGRAMFILES%\WinRAR\winrar" x %CDROM%\Inst\W2KEN\DirectX90b_redist.rar "%SYSTEMDRIVE%\Script""
ENFP1=\Inst\W2KEN\DirectX90b_redist.rar
ENCMD2=%SYSTEMDRIVE%\Script\DirectX9\DirectX9\dxsetup.exe /windowsupdate
ENFP2=%SYSTEMDRIVE%\Script\DirectX9\DirectX9\dxsetup.exe
TEMPDIR=%SYSTEMDRIVE%\Script\DirectX9
ProcWaitFor=dxsetup.exe
Comment=DirectX Interface


[AccessRuntime]
ProgName=MS Access 2000
Commands=2
Install=Yes
Languages=EN
ENCMD1=""%PROGRAMFILES%\WinRAR\winrar" x %CDROM%\Office\Access2000Runtime.rar "%SYSTEMDRIVE%\Script""
ENCMD2=msiexec /qn /i %SYSTEMDRIVE%\Script\Access2000RunTime\data1.msi TRANSFORMS="%SYSTEMDRIVE%\Script\Access2000RunTime\ACR.MST"
ENFP1=\Office\Access2000Runtime.rar
ENFP2=%SYSTEMDRIVE%\Script\Access2000Runtime\data1.msi
TEMPDIR=%SYSTEMDRIVE%\Script\Access2000RunTime
Image=Access.bmp
Comment=Runtime ONLY!`

[Indeo]
ProgName=Indeo Video Codecs
Install=Yes
Languages=EN
ENCMD=%CDROM%\INST\Video\Indeo\Setup -s
ENFP=\INST\Video\Indeo\Setup.exe
ProcWaitFor=_IsDel.Exe
Comment=Indeo video Codecs


[Acrobat5]
ProgName=Acrobat Reader 5.1
Commands=2
Install=Yes
Languages=NL,EN
NLCMD1=""%PROGRAMFILES%\WinRAR\winrar" x %CDROM%\Inst\NL\AcRead51.rar "%SYSTEMDRIVE%\Script""
NLCMD2=%SYSTEMDRIVE%\Script\AcrRead51\setup -s
ENCMD1=""%PROGRAMFILES%\WinRAR\winrar" x %CDROM%\Inst\EN\AcRead51.rar "%SYSTEMDRIVE%\Script""
ENCMD2=%SYSTEMDRIVE%\Script\AcrRead51\setup -s
NLFP1=\Inst\NL\AcRead51.rar
NLFP2=%SYSTEMDRIVE%\Script\AcrRead51\setup
TEMPDIR=%SYSTEMDRIVE%\Script\AcrRead51
ENFP1=\Inst\EN\AcRead51.rar
ENFP2=%SYSTEMDRIVE%\Script\AcrRead51\setup
TEMPDIR=%SYSTEMDRIVE%\Script\AcrRead51
Image=3422.bmp
Comment=Acrobat Reader voor het lezen van PDF Bestanden
ProcWaitFor=_IsDel.Exe


[WinAmp]
ProgName=Winamp 2.91
Install=Yes
ENCMD=%Systemdrive%\Script\AutoIt3  %Systemdrive%\Script\Winamp.au3
ENFP=\Inst\winamp291_full.exe
Languages=EN
Comment=Afspelen van MP3 bestanden

[CDEX]
ProgName=CDEX Audio Extractor 1.51
Install=Yes
ENFP=\Inst\cdex_151.exe
Languages=EN
Comment=Use to create MP3 files from audio CD's
ENCMD=%Systemdrive%\Script\AutoIt3 %Systemdrive%\Script\CDex.Au3


[Irfanview]
ProgName=IrfanView 3.85
Install=Yes
ENCMD=%Systemdrive%\Script\AutoIt3 %Systemdrive%\Script\IrfanVw.AU3
Languages=EN
ENFP=\Inst\Iview385.exe
Comment=Quick and versatile image and multimedia viewer

[RealPlayer]
Install=Yes
ENFP=Internet\RealOnePlayerV2GOLD.exe
Language=EN


[QuickTime]
Install=Yes
NLCMD=%CDROM%\Inst\Internet\NL\QuickTimeInstaller.exe
ENCMD=%CDROM%\Inst\Internet\QuickTimeInstaller.exe
NLFP=\Inst\Internet\NL\QuickTimeInstaller.exe
ENCMD=\Inst\Internet\QuickTimeInstaller.exe
Languages=NL,EN
Comment=Quicktime

[WinRar]
Install=Yes
NLCMD=%Systemdrive%\Script\AutoIt3 %Systemdrive%\Script\WR32NL.AU3
ENCMD=%Systemdrive%\Script\AutoIt3 %Systemdrive%\Script\WR32.AU3
Languages=EN,NL
ENFP=\Inst\EN\Wrar320.exe
NLFP=\Inst\NL\Wrar320nl.exe
Comment=Voor Zip en RAR compressie

[ZoneAlarm]
Install=Yes
Language=EN
FileName=Internet\zlsSetup_45_538.exe

[SpyBot]
ProgName=SpyBot 1.2
Install=Yes
ENCMD=%Systemdrive%\Script\AutoIt3 %Systemdrive%\Script\SpyBot.AU3
ENFP=\Inst\Internet\spybotsd12.exe
Languages=EN
Comment=Spybot Search and Destroy rids your system of Spyware, trojans and other malware

[SunJava]
ProgName=Sun Java 1.4.2.03
Install=Yes
ENCMD=%CDROM%\Inst\Internet\j2re-1_4_2_03-windows-i586-p.exe /s /v"/qn ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1 REBOOT=Suppress"
Languages=EN
ENFP=\Inst\Internet\j2re-1_4_2_03-windows-i586-p.exe
Image=Java1.BMP
ProcWait=J2RE-1_4_2_03-W

[FreshDiagnose]
ProgName=FreshDiagnose 1,4
Install=Yes
ENCMD=%Systemdrive%\Script\AutoIt3 %Systemdrive%\Script\FreshDiag.AU3
ENFP=\Inst\Diagnose.exe
Comment=Use to create a report of your hardware and software system

[TightVNC]
ProgName=TightVNC 1.2.9
Install=Yes
ENCMD=%CDROM%\Inst\tightvnc-1.2.9-setup /sp- /verysilent
Languages=EN
ENFP=\Inst\tightvnc-1.2.9-setup.exe
Image=vnc.bmp
Comment=Remote Control program


[TightVNCSettings]
Install=Yes
ENCMD=regedit /s %Systemdrive%\Script\vnc.reg
Languages=EN
ENFP=\Inst\script\vnc.reg

[TightVNCService]
Install=Yes
ENCMD="%PROGRAMFILES%\TightVNC\WinVNC.exe" -install
Languages=EN
ENFP=%PROGRAMFILES%\TightVNC\WinVNC.exe


[W2KSupport]
ProgName=Support Tools
Install=Yes
ENCMD=msiexec /qb /i %CDROM%\support\tools\2000rkst.msi
Languages=EN
ENFP=\support\tools\2000rkst.msi
Comment=Extra tools voor Windows 2000

[AppCompat]
Install=Yes
ENCMD=regsvr32 /s %WINDIR%\apppatch\slayerui.dll
Languages=EN
ENFP=c:\winnt\apppatch\slayerui.dll

[DivX]
ProgName=DivX Codec
Install=Yes
ENCMD=%CDROM%\Inst\Video\DIvx511bundle -s
Languages=EN
ENFP=\Inst\Video\DIvx511bundle.exe
Image=Divx.bmp
Comment=Versie 5.11

[IE6]
ProgName=Internet Explorer 6 SP1
Install=Yes
NLCMD=%CDROM%\Inst\Internet\NL\IE6\IE6Setup
ENCMD=%CDROM%\Inst\Internet\EN\IE6\IE6Setup
Languages=EN,NL
ENFP=\Inst\Internet\EN\IE6\IE6Setup.exe
NLFP=\Inst\Internet\NL\IE6\IE6Setup.exe
Image=IE1.BMP
Comment=Internet Explorere 6

[MediaPlayer7]
Install=No
NLCMD=%CDROM%\Inst\NL\MP71.exe /Q:A /R:N /C:"setup_wm.exe /Q /R:N" 
ENCMD=%CDROM%\Inst\EN\MP71.exe /Q:A /R:N /C:"setup_wm.exe /Q /R:N" 
Languages=EN,NL
ENFP=%CDROM%\Inst\EN\MP71.exe
NLFP=%CDROM%\Inst\NL\MP71.exe

[MediaPlayer9]
ProgName=Windows Mediaplayer 9
Install=Yes
Languages=EN,NL
ENCMD=%Systemdrive%\Script\AutoIt3 %Systemdrive%\Script\MP9EN.AU3
ENFP=\Inst\W2KEN\MPSetup.exe
NLCMD=%Systemdrive%\Script\AutoIt3 %Systemdrive%\Script\MP9NL.AU3
NLFP=\Inst\W2KNL\MPSetup.exe
Comment=Mediaplayer


[MDAC]
ProgName=MDAC Versie 2.8
Install=Yes
NLCMD=%CDROM%\Inst\W2KNL\NLmdac28 /Q /C:"Dasetup /Q/N"
ENCMD=%CDROM%\Inst\W2KEN\ENmdac28 /Q /C:"Dasetup /Q/N"
Languages=EN,NL
ENFP=\Inst\W2KEN\ENMDAC28.EXE
NLFP=\Inst\W2KNL\NLMDAC28.EXE
Comment=Microsoft Data Access Components

[PageDefrag]
Install=Yes
ENCMD=""%PROGRAMFILES%\winrar\rar" x %CDROM%\Inst\pagedfrg.rar "%PROGRAMFILES%\Support Tools\""
Languages=EN
ENFP=\Inst\pagedfrg.rar


[Junction]
Install=Yes
ENCMD=""%PROGRAMFILES%\winrar\winrar" x %CDROM%\Inst\Junction.zip junction.exe "%PROGRAMFILES%\Support Tools\""
Languages=EN
ENFP=\Inst\Junction.zip


[StdRegSettings]
Install=Yes
ENCMD=regedit /s %SYSTEMDRIVE%\Script\W2Krg.reg
Languages=EN
ENFP=%SYSTEMDRIVE%\Script\W2Krg.reg

[HerstVerbergPC]
Install=No
ENCMD=regedit /s %SYSTEMDRIVE%\Script\NetwVis.reg
Languages=EN
ENFP=%SYSTEMDRIVE%\Script\NetwVis.reg
Comment=Maakr PC weer zichtbaar in het netwerk


[RecoveryConsole]
ProgName=Windows Recovery Console
Install=Yes
ENCMD=%CDROM%\i386\winnt32 /cmdcons /unattend
Languages=EN
ENFP=\i386\winnt32.exe
Comment=For emergencies

[Mozilla]
Install=Yes
Languages=EN
ENCMD=%Systemdrive%\Script\AutoIt3 %Systemdrive%\Script\FireFox.Au3
Comment=Mozilla.Org Firefox browser
ENFP=\Inst\Internet\FireFox\FireFoxSetup-0.8.EXE

[MacroMedia]
ProgName=Shockwave & Flash
Install=Yes
Languages=EN
ENCMD=%Systemdrive%\Script\AutoIt3 %Systemdrive%\Script\ShwFlAll.Au3
ENFP=\Inst\Internet\Flash_Shockwave_Full.exe
Comment=Macromedia Flash and Shockwave plugins


[HFPRESP5]
ProgName=Diverse HotFixes
Commands=14
Install=Yes
Languages=NL,EN
NLCMD1="%CDROM%\Inst\W2KNL\x86win2k\Windows2000-KB823182-x86-NLD.exe -q -u -o -z"
NLCMD2="%CDROM%\Inst\W2KNL\x86win2k\Windows2000-KB823559-x86-NLD.exe -q -u -o -z"
NLCMD3="%CDROM%\Inst\W2KNL\x86win2k\Windows2000-KB823980-x86-NLD.exe -q -u -o -z"
NLCMD4="%CDROM%\Inst\W2KNL\x86win2k\Windows2000-KB824105-x86-NLD.exe -q -u -o -z"
NLCMD5="%CDROM%\Inst\W2KNL\x86win2k\Windows2000-KB824141-x86-NLD.exe -q -u -o -z"
NLCMD6="%CDROM%\Inst\W2KNL\x86win2k\Windows2000-KB824146-x86-NLD.exe -q -u -o -z"
NLCMD7="%CDROM%\Inst\W2KNL\x86win2k\Windows2000-KB825119-x86-NLD.exe -q -u -o -z"
NLCMD8="%CDROM%\Inst\W2KNL\x86win2k\Windows2000-KB826232-x86-NLD.exe -quiet -passive -o -norestart"
NLCMD9="%CDROM%\Inst\W2KNL\x86win2k\Windows2000-KB828028-x86-NLD.exe -q -u -o -z"
NLCMD10="%CDROM%\Inst\W2KNL\x86win2k\Windows2000-KB828035-x86-NLD.exe -q -u -o -z"
NLCMD11="%CDROM%\Inst\W2KNL\x86win2k\Windows2000-KB829558-x86-NLD.exe -q -u -o -z"
NLCMD12="%CDROM%\Inst\W2KNL\x86win2k\WindowsMedia9-KB819639-x86-NLD.exe /Q"
NLCMD13="%CDROM%\Inst\W2KNL\x86win2k\WindowsMedia-KB828026-x86-NLD.exe -q -u -o -z"
NLCMD14="%CDROM%\Inst\W2KNL\qchain.exe"
NLFP1="\Inst\W2KNL\x86win2k\Windows2000-KB823182-x86-NLD.exe"
NLFP2="\Inst\W2KNL\x86win2k\Windows2000-KB823559-x86-NLD.exe"
NLFP3="\Inst\W2KNL\x86win2k\Windows2000-KB823980-x86-NLD.exe"
NLFP4="\Inst\W2KNL\x86win2k\Windows2000-KB824105-x86-NLD.exe"
NLFP5="\Inst\W2KNL\x86win2k\Windows2000-KB824141-x86-NLD.exe"
NLFP6="\Inst\W2KNL\x86win2k\Windows2000-KB824146-x86-NLD.exe"
NLFP7="\Inst\W2KNL\x86win2k\Windows2000-KB825119-x86-NLD.exe"
NLFP8="\Inst\W2KNL\x86win2k\Windows2000-KB826232-x86-NLD.exe"
NLFP9="Inst\W2KNL\x86win2k\Windows2000-KB828028-x86-NLD.exe"
NLFP10="\Inst\W2KNL\x86win2k\Windows2000-KB828035-x86-NLD.exe"
NLFP11="\Inst\W2KNL\x86win2k\Windows2000-KB829558-x86-NLD.exe"
NLFP12="\Inst\W2KNL\x86win2k\WindowsMedia9-KB819639-x86-NLD.exe"
NLFP13="\Inst\W2KNL\x86win2k\WindowsMedia-KB828026-x86-NLD.exe"
NLFP14="\Inst\W2KNL\qchain.exe"
Comment=Pre SP5 Updates voor WIndows 2000

[VBRuntimeSP5]
ProgName=Visual Basic Runtime
Install=Yes
ENCMD=%CDROM%\Inst\W2KEN\vbrun60sp5 /Q
Languages=EN
ENFP=\Inst\W2KEN\vbrun60SP5.EXE
Comment=SP5 Update

[OO11]
Install=Yes
NLCMD=%CDROM%\Office\OOo_1.1.0_Win32Intel_install_nl-NL\Setup.exe -r:%SystemDrive%\Script\OO11Inst.INI
NLFP=\Office\OOo_1.1.0_Win32Intel_install_nl-NL\Setup.exe
ProgName=OpenOffice 1.1
Languages=NL
Comment=De Open Source Office Suite

[MSCOMCTL]
Commands=2
Install=No
Progname=Microsoft Common Controls Library
Languages=EN
ENCMD1=""%PROGRAMFILES%\WinRAR\winrar" x %CDROM%\Inst\W2KEN\MSCOMCTL.rar "%SYSTEMDRIVE%\Script""
ENCMD2=%Systemdrive%\Script\AutoIt3 %Systemdrive%\Script\comct.AU3
ENFP1=\Inst\W2KEN\MSCOMCTL.rar
ENFP2=%Systemdrive%\Script\MSCOMCTL.OCX
Comment=

[MyODBC]
Progname=MySQL ODBC Drivers 3.51
ENCMD=%CDROM%\Inst\W2KEN\MyODBC-3.51.06.exe /Silent
ENFP=\Inst\W2KEN\MyODBC-3.51.06.exe
Languages=EN
Install=Yes

[Shutdown]
Install=Yes
ENCMD=%SYSTEMDRIVE%\Script\Shutdown.exe /L /R /T:30 /Y
ENFP=C:\Script\Shutdown.exe
Languages=EN

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

:D fine, i love this script. I would recommend to cut to another file .ini only exclusive for the programs. and also a way of choosing quickly which is YES this time and not should be fine. :huh2:, also fine

I send an script for making a report of list of programs:

$used=FileOpen("inifile.ini")

if $used=-1 then

msgbox(0,"Error","Unable to open file")

Exit

endif

while 1

$temp0=filereadline($used)

if @error=-1 then exitloop

$temp1=StringSplit($temp0,"=")

if $temp1[0] ="ProgName" then

$reporte=$reporte & $temp1[1] @cr

endif

wend

ClipPut($reporte)

exit

any of you can send script of these about this thema?

Edited by BasicOs

Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http

Share this post


Link to post
Share on other sites

Well, as I mentioned, a GUI script/program to aid in the setting of the software.ini parameters would be a nice addition. As long as that isn't there, your method may work as well. Of course one can also create and start from a "maximum" script, and just delete the entries in the FirstRun, secondrun,... lines (which is what I often do)

Ronald

Share this post


Link to post
Share on other sites

Also I forgot to mention (but it may be apparent from the script) is that as the extension of the file to be run =.au3 that the script will start another instance of autoit and run that script.

Share this post


Link to post
Share on other sites

Your script looks nice!

I've been working on something similar myself for a long time now. It is about 95% finished now, though needs some tweaking and such.

Here are the things I implemented differently than you did, though most of it is similar.

1.) Instead of using a fresh install of Windows, I created a hardware-generic install of Windows XP, which in my process is called a Windows XP Base Image. I configured and tweaked the Windows XP Base Image, installed all Windows Updates, etc. I use Novell''s ZENWorks Imaging to backup the image. Before backing it up, I run SysPrep.

2.) I have added to the Run key in the XP Base Image registry a reference to a shell script I wrote, called 'BuildImage.exe'. BuildImage takes care of installing drivers, applications, cleaning up the system (e.g. emptying recycle bin, deleting temp files, etc). These scripts are AutoIt scripts. I use registry keys to determine which tasks have not been completed.

3.) I have Windows XP set to auto-login throughout the entire process so that the installation is automated.

4.) I use ZEN Works Add-On Images in combination with my scripts and XP Base Image to make image profiles. These image profiles basically define what drivers and software goes on a model of machine so that I can re-use applications installers for different departments and such.

Share this post


Link to post
Share on other sites

So then you can use the sysprep.inf to start the script similar as I do in winnt..sif.

I have not use sysprep, it is supposed to be hardware independent, and additional drivers may be specified through the OEMPnPdriversPath in the sysprep.inf (again similar to winnt.sif) does that work well for you?

Obviously there are mixed advantages: with a sysprepped image, you can have software preinstalled, however if an update or a new version arrives, you have to recreate the image.

Share this post


Link to post
Share on other sites

I have uploaded the files into the public area the stuff is here

http://www.autoitscript.com/fileman/users/public/ronaldvr/

Share this post


Link to post
Share on other sites

Can you please post a screenshot?

Currently I'm making my own version and I was wondering how your script looks like in action.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0