Automated Install Script

Due to a huge increase in employee numbers I decided it was time to speed up the deployment process. I had worked with automatic install scripts before whilst at IBM’s Innovation Centre, in fact I rewrote most of them to match newer OS versions etc.

So with a little experience behind me I decided to write a script from scratch that installed the following:

  • .Net 4 (see older post)
  • Adobe Reader
  • Adobe Flash
  • Java Run Time
  • Office 2010 SP1
  • Windows Activation
  • Internal Help Desk application
  • Cisco VPN client (for customer access)

OK, so those who are experts in this will see a very simple, perhaps clunky script, but for what I need it’s perfect. Complete with comments and prompts the script is only 42 lines. and requires only 1 click to run and a further 3 for the Windows activation and Office installer.

A note on deploying Office 2010 – I created my own .mum file and inserted into the Updates folder in the installer location to create this I ran setup.exe /admin and made it as silent as possible to install, meaning you only have to click “Install Now”, it even activates Office for me. For help on this I actually used Microsoft documentation! (http://technet.microsoft.com/en-us/library/dd630736.aspx)

Here’s my entire script (with product keys and file locations modified for security purposes):

@ECHO OFF
rem ———-Installer Coded by Jonathan Ward 13/06/2012————–
rem ——————–Major Update 18/06/2012————————
rem **Updates 19/06/2012** :- Office SP1 & Java included
echo Welcome to Auto Installer
echo Activating Windows 7… EXPECT 2 POPUPS (click OK)
“%windir%\system32\slmgr.vbs” /ipk [key goes here]
“%windir%\system32\slmgr.vbs” /ato
echo …done
echo Installing .Net 4 Runtime…
“\\[file location]\netlogon\dotNetFx40_Full_x86_x64.exe” /quiet /norestart
echo …done
echo Installing Adobe Reader…
“[file location]\newpc\AdobeRdr1000.exe” /sAll /msi /norestart ALLUSERS=1 EULA_ACCEPT=YES
echo …done
echo Installing Adobe Flash…
“[file location]\newpc\flash_iexplore.exe” -install
“[file location]\newpc\flash_firefox.exe” -install
echo …done
echo Installing Java Runtime…
“[file location]\newpc\java.exe” /s
echo …done
echo Installing Cisco VPN…
mkdir %USERPROFILE%\Desktop\cisco
xcopy “[file location]\newpc\cisco” %USERPROFILE%\Desktop\cisco /Y /q
start /wait msiexec.exe /q /i “%USERPROFILE%\Desktop\cisco\vpnclient_setup.msi” /norestart
xcopy “[file location]\All PCF” “%ProgramFiles%\Cisco Systems\VPN Client\Profiles” /Y /q
rd /s /q %USERPROFILE%\Desktop\cisco
echo …done
echo Installing Microsoft Office 2010… (Click Install Now)
“[file location]\Office 2010\setup.exe” /config “\[file location]\Office 2010\ProPlus.WW\config.xml”
echo …done
echo Installing Microsoft Security Essentials…
“[file location]\newpc\mse.exe” /s /runwgacheck /o
echo …done
echo Installing Service Desk…
md “%ProgramFiles%\Beoley Mill Software Ltd\BMS ServiceDesk”
xcopy “[file location]\Updates\Dev\*.*” “%ProgramFiles%\[file location]” /Y /E /q
start cscript “[file location]\csnew.vbs”
echo …done
echo Installer complete!
pause

I hope that some of you find this useful in your own script developments.