Home > Uncategorized > Silent Installs

Silent Installs

Recently when doing an upgrade from Windows XP to 7 in our shop, I had to install “viewer” software required by GM.  Now GM tried to make it as easy as possible by creating a script on their website that checks for the software and if it isn’t installed will display links for the download and a message along the lines of “your computer needs this, please download it”.  It even has a neat Java based downloader (they must be proud of that).  Sadly, the neat downloader doesn’t run the installer after you download it.  Now I have nothing against car techs but they are the same as any user, “after clicking on the link and the progress bar is gone its installed, right?”

Now using an image based install, generally I would have added this viewer software to the image before sending it out to the PCs, but of course this particular software didn’t like being installed then ghosted AT ALL.  This left me with walking around to each of the PC’s to install the 3 software packages manually or script it.  Now any respecting SysAdmin would have chosen for the scripting option and that is exactly what I did.

So first off I created a security group in our “application install” OU and added the user accounts for the technicians.  Next was to create the group policy that would run the install scripts at logon. Now to the scripts!

The first of the “viewer” installs was an msi.  so I opened up run and typed in “msiexec /?” to get the command line listing for msi installs.  After a quick review I wrote the following script

REM Map G Drive for Installs
net use g: \\domain.name\netlogon\gm_viewers

REM Install Metaweb
if exist “C:\Program Files\Ematek\MetaWeb\MetaWebU.ocx” goto end
xcopy /E /C /Y /I g:\metaweb.msi c:\metaweb.msi
msiexec /i “c:\metaweb.msi” /quiet /passive /norestart

REM Remove G drive
net use g: /d /y

:end
net use g: /d /y

So to break down the script.  First thing I did was map the install drive to an unused letter.  Next was the “if exist” line of code to check if the program was already installed.  If it was the script goes to the :end marker and disconnects the network drive.  If it is not there it will run the msiexec /i script with the /quiet /passive /norestart switches.  If you want a description of these switches just run msiexec /? in run or command line.
The second installer came down as a self extracting zip file, so I uncompressed the files and it was also a MSI, just a quick change to the first script and I was 2/3 on my way to finishing.

The third installer was to be a bit more problematic.  There was no MSI install, but instead a InstallSheild installer.  I tried a /s and /silent switch with setup.exe to no avail.  So off to Google I went and found a few articles about silent installing InstallSheild software.  Seems that /s was the right switch, but the software required an answer file.  Luckily there was a handy /r switch that will create an answer file when you run the program.  The answer file is stored in c:\windows\setup.iss.  All I had to do was copy the setup.iss file to the installation directory and run my script with the /s switch.  Below is the script.

REM Map G Drive for Installs
net use g: \\domain.name\netlogon\gm_viewers

REM Install Tiff Viewer
if exist “C:\Program Files\GM\TIFF Viewer Plugin\NPIMGVIE.dll” goto end
xcopy /E /C /Y /I g:\tiffview c:\tiffview
c:\tiffview\setup.exe /s

REM Remove G drive
net use g: /d /y

:end
net use g: /d /y

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: