WPIW – Scripting Software Installs and Unattended Switches

Making a windows software image can take a long time — there’s tons of little programs to install. Fortunately, Windows Post Install Wizard (WPIW) can lend a helping hand. WPIW will auto-install a whole bunch of software unattended–if it’s configured well.

To get started:

  • Download WPIW from their website.
  • Download installers for your standard software list.
  • Configure WPIW with the unattended flags for the software products you want to install.

Finding the unattended switches for your favorite packages can be daunting. Here’s a list of some of the switches I’ve found:

Unattended Switches

7Zip 9.20
msiexec /i %wpipath%\Install\Standalone\7z920-x64.msi /qb /norestart

Adobe Acrobat X
setup.exe /rs /sPB

CD Burner XP 4.3.7.2316
cdbxp_setup_4.3.7.2316.exe /verysilent

FileZilla 3.3.5.1
FileZilla_3.3.5.1_win32-setup.exe /S

Google Chrome (download the MSI package)
msiexec /i %wpipath%\install\standalone\GoogleChromeStandaloneEnterprise.msi /qb

HyperChem 8.0.6
setup.exe /s

iTunes 10.1.2
First, run iTunesSetup.exe, then navigate to %temp% and copy the MSI installers out of the temp folder (they’re in a subfolder).
Then, install all of the MSI files one at a time:
msiexec /i "%wpipath%\install\itunes\10.1.2\appleapplicationsupport.msi" /qb /norestart
msiexec /i "%wpipath%\install\itunes\10.1.2\quicktime.msi" /qb /norestart
msiexec /i "%wpipath%\install\itunes\10.1.2\bonjour64.msi" /qb /norestart
msiexec /i "%wpipath%\install\itunes\10.1.2\applemobiledevicesupport64.msi" /qb /norestart
msiexec /i "%wpipath%\install\itunes\10.1.2\applesoftwareupdate.msi" /qb /norestart
msiexec /i "%wpipath%\install\itunes\10.1.2\itunes64.msi" /qb /norestart

Java 6 u23
jre-6u23-windows-i586-iftw.exe /s

MDL Chime 2.6 SP7 for Internet Explorer and Firefox
MDLChime26SP7.exe /s /f1

Microsoft Office 2010
First, run setup.exe /admin and create a ‘msp’ file, then use:
%wpipath%\Install\office2010\setup.exe /adminfile %wpipath%\install\office2010\office2010-custom.MSP

Notepad++ 5.8.6
npp.5.8.6.Installer.exe /S

PDF Creator 1.2.0
First, run pdfcreator-1_2_0_setup.exe /SAVEINF=”C:\pdfcreator-install.inf”, to capture the install settings you want, then run:
pdfcreator-1_2_0_setup.exe /LOADINF="%wpipath%\install\pdfcreator-1.2.0\pdfcreator.ini" /silent

Paint.Net 3.5.6
Paint.NET.3.5.6.Install.exe /auto /CHECKFORUPDATES=0 DESKTOPSHORTCUT=0

Pasco DataStudio
setup.exe /s

Realplayer 14
First, run setup, click cancel, then download the ‘alternate installer’. Then run:
realplayer.exe /S

Thunderbird 3.3.1
Thunderbird Setup 3.1.1.exe -ms -ira

Unlocker 1.8.8
unlocker188.exe /VERYSILENT /NORESTART

WinRAR 3.93
wrar393.exe /s

WinSCP 4.2.9
winscp429setup.exe /silent

XML Notepad 2007
msiexec /i "%wpipath%\install\standalone\XmlNotepad.msi" /qb

If you have more, feel free to comment! I might have to make an excel sheet (or at least a table).

Advertisements

Basic Windows 7 Deployment Services Overview

Deploying windows 7 on a small-medium scale is super easy.

Quick Overview

To deploy windows 7, you need to create installation images. At first this was done by the Windows Automated Installation Kit (WAIK). The WAIK provides all the command-line tools to create windows 7 images, but doesn’t really help you much. There’s no fancy GUI or anything. This is where the Microsoft Deployment Toolkit (MDT) comes in. MDT is a front-end for the WAIK, which makes it (more or less) pretty easy to create great windows 7 images. Transferring those images to your workstations can be done via USB or DVD. To PXE the images to your workstations, you need to use Windows Deployment Services (WDS).

Gather your Tools

First, collect everything you need:

  • Deploy 2 new VM’s:
    • MDT, or MS Deployment Toolkit, this will make the installation images.
    • WDS, or windows deployment services. This will actually transfer the images to your target workstations.
  • Download and install Windows Automated Installation Kit on the MDT server.
  • Download and install Microsoft Deployment Toolkit 2010 Update 1 on the MDT server.
  • Install the WDS role on your wds server.
  • Copy the Windows 7 x64 media to your MDT server: C:\workingtemp\Win7x64.
  • Download the drivers for your workstation. For Dell business class workstations, you only need the “Driver Pack” which is a large CAB file filled with all the drivers you’ll need for that model. It’s a beautiful thing (thanks so much Dell!).

The Procedure

There are so many good blogs out there, that I’m really only going to give some tips and point you in the right directions. Deployment is done in one of three ways:

  1. LTI or Lite Touch Installation
  2. UDI or User Driven Installation (SCCM Only)
  3. ZTI or Zero Touch Installation (SCCM Only)

I’m guessing that you don’t have System Center Configuration Manager (SCCM) installed, which restricts you to LTI installations. This basically means that you have to be at the workstation, reboot it to media or PXE, and start the install by hand.

To get started with MDT, download and read this excellent guide from Microsoft (sorry, I could only find the file, and not a link): Deploying Windows 7 with MDT 2010 – Basic scenarios

Some quick notes:

Sorry if this post is weak. This is just what I’ve learned so far.

Windows 7 Profile Synchronization Problem – ProfileList

So, I was testing Windows 7 roaming profiles and ran into the following error which wouldn’t shake off: “You have been logged on with a temporary profile”. Here’s what happened:

I wanted to see if profiles were properly downloading from the server, so on my test workstation I deleted the test user’s profile from C:\Users. When I tried logging on as the test user, Windows 7 gave me the error message. After poking around on the web, I learned that Windows 7 actually keeps track of all the profile folders in this registry key: HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList. After deleting the key corresponding to C:\Users\TestUser, subsequent logins worked perfectly. You’d think Windows 7 could handle this on it’s own. At least the fix is easy.

Windows 7, Folder Redirection, and Redundant Folders

Another ongoing Windows 7 migration issue: I deployed a new test workstation, logged in with a brand new test user, clicked the username in the start menu, and explorer showed me this:

  • Contacts (redirected)
  • Desktop (local)
  • My Desktop (redirected)
  • Documents (local)
  • My Documents (redirected)
  • Downloads (local)
  • Favorites (local)
  • Links (local)
  • Music (local)
  • My Music (redirected)
  • My Pictures (redirected)
  • My Videos (redirected)
  • Pictures (local)
  • Saved Games (redirected)
  • Searches (redirected)
  • Videos
  • <username>$ (redirected; the user’s share)

Redundant much? Turns out that about haf of these folders were created on first login by the “Default User” profile in C:\Users. I removed all the folders from “Default User” and the next test user was clean. I hope that saves someone some time :).

Windows Sidebar, Gadgets, and Roaming Profiles

So, Roaming Profiles with Windows 7 is my current project at OSU Chemistry. One thing I noticed early on is that Gadgets don’t roam, since their data is stored in %localappdata% (kinda like Google Chrome). However, it’s pretty easy to save and restore the gadgets and gadget settings with login and logoff scripts.

The Scripts

Save-Gadgets


@ECHO OFF
REM Make sure Windows Sidebar is installed.
IF NOT EXIST "C:\Users" GOTO END
IF NOT EXIST "C:\Program Files\Windows Sidebar\sidebar.exe" GOTO END

REM Save Gadgets Data
IF NOT EXIST "\\winfs\%username%$\profile\gadgets" MKDIR "\\winfs\%username%$\profile\gadgets"
IF EXIST "C:\Users\%username%\appdata\local\microsoft\windows sidebar" COPY /Y "C:\Users\%username%\appdata\local\microsoft\windows sidebar\*" \\winfs\%username%$\profile\gadgets

:END

Restore-Gadgets


@ECHO OFF
REM Make sure Windows Sidebar is installed.
IF NOT EXIST "C:\Users" GOTO END
IF NOT EXIST "C:\Program Files\Windows Sidebar\sidebar.exe" GOTO END

REM Restore Gadgets Data
taskkill /f /im sidebar.exe
IF NOT EXIST "C:\Users\%username%\appdata\local\microsoft\windows sidebar" MKDIR "C:\Users\%username%\appdata\local\microsoft\windows sidebar"
IF EXIST "\\winfs\%username%$\profile\gadgets" COPY /Y "\\winfs\%username%$\profile\gadgets\*" "C:\Users\%username%\appdata\local\microsoft\windows sidebar"

REM start sidebar
start sidebar

:END

Enjoy your gadget’ing!

Google Chrome, Lab Computers, Roaming Profiles

Google Chrome is big here at OSU Chemistry (where isn’t it!?). I really wanted to get it working well for my windows 7 migration project.

Chrome provides two major challenges for us Windows IT folk:

  1. It installs per-user to the local user profile, under “%LOCALAPPDATA%\Google\Chrome”, meaning that it can’t be installed for all users.
  2. It keeps it’s data in “%LOCALAPPDATA%\Google\Chrome”, meaning that the data doesn’t roam.

Problem 1 is actually very easy to solve. To install Chrome for all users in the %programfiles% directory, download and install Chrome via Google Pack. Anything installed via Google Pack is automatically in Program Files for all users.

Problem 2 is where things get tricky. After reading around on the forums, I tried the following ‘workarounds’:

  1. Opening Chrome with the –user-dir-path=”\\fileserver\usershare$\chromeData”. This seemed to work at first, then I realized that double-clicking an HTML file wouldn’t start chrome with the startup flag, so the profile doesn’t load. I then tried modifying the ChromeHTML filetype association in the registry, but it doesn’t allow for variables. When trying –user-dir-path, it expanded literally to “\\<fileserver>\username$\ChromeData”.
  2. Opening Chrome with the –user-dir-path=”Z:\chromeData” where Z: is the locally mapped home folder. This also seemed to work but wouldn’t load web pages. Picking a local folder on C worked fine.
  3. Making a symbolic link to the Z:\ mapped home folder. Chrome would open, but wouldn’t install any extensions.

So I tried saving %localappdata%\google\chrome\Default to the user’s share on logout, and restoring it on login with scripts. This works! Then I noticed that the local Chrome cache on my workstation is something like 600MB. This is not an acceptable solution.

The “Fix”

But, what about Google’s “sync” feature? I wondered if it would be possible to copy only a few necessary files, and if Google Sync would do the rest. This way, at least users could sign in\up for google sync and their bookmarks, preferences, and passwords would still roam. Turns out this works, and you need to copy up\down the following files:

  • Login Data
  • Preferences
  • Web Data

This way, at least the user can set up ‘Google Sync’ to their Google Account, which will roam to any workstation (but without their history). I haven’t tested this with extensions.

The Scripts

Save-ChromeData


REM Save-ChromeData.cmd
@ECHO OFF
IF NOT EXIST "C:\Users" GOTO END

IF NOT EXIST \\winfs\%username%$\profile\chromedata MKDIR \\winfs\%username%$\profile\chromedata
IF EXIST "C:\Users\%username%\appdata\local\google\chrome\user data\default" COPY /Y "C:\users\%username%\AppData\Local\Google\Chrome\User Data\Default\Web Data" \\winfs\%username%$\profile\chromedata
IF EXIST "C:\Users\%username%\appdata\local\google\chrome\user data\default" COPY /Y "C:\users\%username%\AppData\Local\Google\Chrome\User Data\Default\Login Data" \\winfs\%username%$\profile\chromedata
IF EXIST "C:\Users\%username%\appdata\local\google\chrome\user data\default" COPY /Y "C:\users\%username%\AppData\Local\Google\Chrome\User Data\Default\Preferences" \\winfs\%username%$\profile\chromedata

:END

Restore-ChromeData


REM Restore-ChromeData.cmd
@ECHO OFF
IF NOT EXIST "C:\users" GOTO END

IF EXIST "\\winfs\%username%$\profile\chromedata" COPY /Y "\\winfs\%username%$\profile\chromedata\Web Data" "C:\users\%username%\AppData\Local\Google\Chrome\User Data\Default"
IF EXIST "\\winfs\%username%$\profile\chromedata" COPY /Y "\\winfs\%username%$\profile\chromedata\Login Data" "C:\users\%username%\AppData\Local\Google\Chrome\User Data\Default"
IF EXIST "\\winfs\%username%$\profile\chromedata" COPY /Y "\\winfs\%username%$\profile\chromedata\Preferences" "C:\users\%username%\AppData\Local\Google\Chrome\User Data\Default"

:END

Enjoy Chrome’ing!