A Step-by-Step Guide to Silently Installing and Configuring Adobe Reader 8
This is part of my series on How to Install Windows Applications Silently.
With Adobe recently releasing version 8 of Reader, it’s time to prepare it for inclusion in the images I create for distribution to my users machines. I like to assemble an ‘unattended’ or ‘silent’ install of the package that includes every alteration I might normally want to make so from that point forward I only need to double-click and the install is done perfectly every time. You’ll want to read my article “A Guide to Installing Windows Applications Silently” to get instructions on the basic groundwork you should layout first.
You’ll need to create a folder to hold the distribution. If you followed the instructions in the intro article, you’ll already have an %APPS% folder. Create a directory called Reader8 inside your %APPS% directory. You can then download Reader from Adobe here, saving it to the Reader8 folder. I’m using the English 32-bit version for Windows XP SP2 (the file is called AdbeRdr80_en_US.exe), if you are using a different version, it’s possible their could be some differences in how the install works.
Create a text file called Install.bat in your Reader8 directory (see my article “How to Create a Text File” for tips on how to do this). In this text file, place the following:
@ECHO OFF ECHO Installing Adobe Reader 8 start /wait AdbeRdr80_en_US.exe /sAll :: Begin cleaning up shortcuts del "%allusersprofile%Start MenuProgramsStartupAdobe Reader Speed Launch.lnk" del "%allusersprofile%Start MenuProgramsStartupAdobe Reader Synchronizer.lnk" del "%allusersprofile%DesktopAdobe Reader 8.lnk" :: End cleaning up shortcuts :: Begin adding HKLM settings to registry reg add "HKLMSOFTWAREAdobeAcrobat Reader8.0AdobeViewer" /v EULA /t REG_DWORD /d 00000001 /f reg add "HKLMSOFTWAREAdobeAcrobat Reader8.0AdobeViewer" /v Launched /t REG_DWORD /d 00000001 /f reg add "HKLMSOFTWAREAdobeAcrobat Reader8.0Downtown" /v bDontShowAtLaunch /t REG_DWORD /d 00000001 /f :: End adding HKLM settings to registry :: Begin Copy Adobe Updater preference file to all profiles for /f "tokens=* delims=," %%a in ('dir %systemdrive%docume~1 /b /ad') do call :process "%%a" goto :eof :process if [%1]==["All Users"] goto :eof if [%1]==["LocalService"] goto :eof if [%1]==["NetworkService"] goto :eof xcopy AdobeUpdaterPrefs.dat "%systemdrive%Documents and Settings%~1Local SettingsApplication DataAdobeUpdater5" /Y/I :: End Copy Adobe Updater preference file to all profiles exit
Only one line from the script is required to do a silent install of Reader 8, the rest are there to alter the installation to suit my needs. I’ll explain what everything is for, and you can decide if you want to keep it or toss it.
The first line simply says not to echo every single event back to the command prompt screen when the script runs. The second line prints “Installing Adobe Reader 8″ in the window so a viewer can tell what the window is there for. The next line is the one that installs Reader. the start /wait part tells the command to wait until it’s finished before moving on to the rest of the script. This is important as some of the other commands won’t work unless the Reader installation is finished. The /sAll part is a switch to tell the program to install silently with the default options. The other available switches are:
- /sPB – silent mode with progress bar
- /rs – reboot suppress
- /rps – reboot prompt suppress
- /ini “path” – alternative initialization file
- /sl “lang_id” – set language
- /l – enable error logging
- /msi [command line] – parameters for MSIEXEC
Once it finishes, I use the next section of the script to clean up the shortcuts. I prefer not to have the software load when Windows starts, so the first two lines remove shortcuts from the Startup folder. Speed Launch pre-loads Reader every time you start your machine, so it comes up on the screen faster when you need it, but takes up some of your RAM all the time, which I don’t like. Synchronizer is new in this version, and though I can’t find info on what it does, I suspect it’s related to the new work flow feature, which I don’t have a need for. The third shortcut is the one Reader creates on the desktop. I prefer a clean desktop, so I delete this one as well.
Thanks to a tip in the comments, I’ve simplified the next section. It previously had you put the following code in the script above where the HKLM code now sits:
:: Begin adding HKCU settings to all profiles regedit /s HKCU.reg copy HKCU.reg %temp%HKCU.reg /Y start /wait ..changeHKCU.vbs start /wait ..ModifyProfile /PROFILE:all /REG:%temp%HKCU.reg /KEYNAME:TempHive del %temp%HKCU.reg :: End adding HKCU settings to all profiles
These settings will prevent the user agreement from popping up for every user, and stop the ‘Beyond Adobe Reader’ window from popping up every time as well. As the comment points out, you can put the registry changes in the same location of HKLM that I was putting in HKCU. This simplifies the process, not requiring an additional file to be created, or the support vb scripts to exist. For the sake of completeness, here is the text explaining the replaced code that is no longer needed:
The next section sets some preferences in the users registry settings. To do this, you’ll need to create another text file in the Reader8 folder. Create HKCU.reg and put the following contents inside:
REGEDIT4 [HKEY_CURRENT_USERSoftwareAdobeAcrobat Reader8.0AdobeViewer] "EULA"=dword:00000001 "Launched"=dword:00000001 [HKEY_CURRENT_USERSoftwareAdobeAcrobat Reader8.0Downtown] "bDontShowAtLaunch"=dword:00000001
Applying these settings will prevent the user agreement from popping up for every user, and stop the ‘Beyond Adobe Reader’ window from popping up every time as well. The Install.bat file first adds these settings to the registry of the person running the script, then the extra tools you put in your %APPS% folder from the Guide article will apply the settings to all other users profiles, including the ‘default’ profile, so future users will get the settings as well.
The next section of the Install.bat file is used to disable automatic updates. In my environment, users don’t have rights to install applications, so they can’t apply updates to software either. No need for them to be bothered by update notifications then, so I disable updates, not only for Reader, but for all Adobe software (they now have an update program that is shared by most of their software). You’ll need to create another text file in your Reader8 folder, this one called AdobeUpdaterPrefs.dat. In this file, place the following code:
<?xml version="1.0" encoding="UTF-8" ?> <AdobeUpdater> <logFile>%temp%AdobeUpdater5aum.log</logFile> <logLevel>2</logLevel> <SilentCheck>0</SilentCheck> <Launch></Launch> <IsFirstRun>0</IsFirstRun> <InTrayIcon>0</InTrayIcon> <LastDateCheck>2006-12-06</LastDateCheck> <InBackground>0</InBackground> <DownloadDir>%temp%AdobeUpdater5</DownloadDir> <ShowNewProducts>0</ShowNewProducts> <AutoCheck>0</AutoCheck> <AutoCheckType>0</AutoCheckType> <AutoCheckFreq>1</AutoCheckFreq> <ApplicationsEnabled> <MapPrefEntry MapPrefKey="reader8rdr-en_US">0</MapPrefEntry> </ApplicationsEnabled> </AdobeUpdater>
This is the preference file that is created the first time the Adobe Updater is run. I’ve customized it slightly, changing the path for the log file and for the download location so the same file will work for all users. I then change the
<AutoCheck> setting to 0, so the updater doesn’t run. Note that if you use this section of the Install.bat file and a user already has an Adobe product installed, the preference file for their updater will be overwritten and set to not update. Again, in my environment this is desirable but if you’d prefer to receive updates, just delete that section of the Install.bat file, and you won’t need the AdobeUpdaterPrefs.dat file.
With the preference file in place, the rest of that section of the Install.bat file looks at all the available profiles on that computer and copies the preference file to each.
So, when you are done, you should have four files in your Reader8 directory:
Now simply launch Install.bat by double-clicking it, or by calling it from another script, and Adobe Reader 8 will silently install on your computer, and perfectly configure itself to your preferences every time.
Posted: 06 December 9
Under: Silent Installs
Viewed: 91,465 views