Jump to content

Installation with loops and compression


vondaher

Recommended Posts

Hi all,

I want to tell you 2 hints for easy making an unattended installation cd/dvd.

1) At first you can compress the installation files into archives (e.g. 7z). Tu unpack them you can use loops in your install.cmd:

FOR %%i in (prog_inst*.7z) DO 7za x -y %%i
FOR %%i in (prog_copy*.7z) DO 7za x -y %%i -o%ProgramFiles%
del /F /S /Q prog_*.7z

The 'del' command line is optional.

As you can see, this loop will unpack all files in the archives prog_copy* into the Program Folder of your Win Installation. I made it this way, because I have the ability, to divide the files into different archives, e.g. prog_copy_free & prog_copy_share. So it gives me the possibility to make a unattended setup cd with or without shareware.

The same happens with the prog_inst* archives, but in will be unpacked in the \install folder. This leads me to part 2 of my article:

2) Installation with loops.

The most setup.exe can be divided into groups with the same install switches, e.g. NULLSOFT , WISE , INNOSETUP , MSI. So you can use this point to create an automatic installation script. To divide the files into groups you just have to rename the setup.exe with the following prefixes:

_WI_* for Wise Installers

_NS_* for Nullstoft Installers

_IS_* for Innosetup Installers

And here is the small script to do the installations:

REM = Installation with MSI /qr
FOR %%i IN (*.msi) DO start /wait %%i /qr /norestart
move /Y TweakUI.exe %windir%\system32

REM = Installation with Nullsoft Silent Installer /S
FOR %%i IN (_NS_*.exe) DO start /wait %%i /S
taskkill /IM EvilLyrics.exe /F
taskkill /IM QCDPlayer.exe /F

REM = Installation with INNOSETUP /VERYSILENT /SP- /NORESTART
FOR %%i IN (_IS_*.exe) DO start /wait %%i /VERYSILENT /SP- /NORESTART
taskkill /IM ConTEXT.exe /F
copy /y ger.lng %ProgramFiles%\Free Download Manager\Language\

REM = Installation with WISE SETUP /s
FOR %%i IN (_WI_*.exe) DO start /wait %%i /s
taskkill /IM stardown.exe /f

And here is the file list of the prog_inst_free.7z archive:

_IS_asciiartmachine.exe

_IS_dvdshrink32setup.exe

_IS_dvdbuilder.exe

_IS_everesthome151.exe

_IS_fdminst.exe

_IS_idoswin.exe

_IS_mpth_15.exe

_IS_netmeter.exe

_IS_pdfcreator_080_afpl_ghostscript.exe

_IS_regcleaner.exe

_IS_spybotsd13.exe

_IS_VCDEasy1152.exe

_IS_xnview174.exe

_IS_ZContextsetup.exe

_NS_evillyrics.exe

_NS_installspeedfan417.exe

_NS_qcd451.exe

_NS_tgf_065.exe

_WI_flashplayer7installer.exe

_WI_rjhext13.exe

_WI_stardownloaderfree_143.exe

AdobeReader602update.msi

CalcPlus.msi

CDBurnerXPPro3.msi

cladDVDNET_350.msi

FindJunkFiles.msi

ger.lng

JournalViewer.msi

mbsasetup-de.msi

powertoys_Powercalc.msi

powertoys_TweakUI.msi

powertoys_Timershot.msi

powertoys_SlideshowGenerator.msi

powertoys_Taskswitch.msi

powertoys_DeskMan.msi

powertoys_HTMLSlideShow.msi

powertoys_ImageResizer.msi

powertoys_Magnifier.msi

TweakUI.exe

To arrange the order of installation you can rename the files (e.g. Context will be installed at the end of all _IS_* files because of the filename _IS_ZContextsetup.exe).

Note: Don't use special characters like space for the file names!

You can create other installation groups using the above mentioned scheme.

I think, this way is easier to install than to make one or more entries for each installation file. It's also easier to update the setup cd - you don't have to care about the filename after the prefix!

Any remarks?

Grtz!

vondaher

Link to comment
Share on other sites

  • 1 month later...

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...