Microsoft KB Archive/885885

= How to create and use a batch file to silently install multiple GDI+ security updates =

Article ID: 885885

Article Last Modified on 4/11/2006

-

APPLIES TO


 * Microsoft Windows XP Home Edition
 * Microsoft Windows XP Media Center Edition 2002
 * Microsoft Windows XP Professional
 * Microsoft Windows XP Tablet PC Edition
 * Microsoft Internet Explorer 6.0
 * Microsoft Office XP, All Editions
 * Microsoft Office Project Professional 2003
 * Microsoft Office Project Standard 2003
 * Microsoft Project 2002 Professional Edition
 * Microsoft Project 2002 Standard Edition
 * Microsoft Office Visio Professional 2003
 * Microsoft Office Visio Standard 2003
 * Microsoft Visio 2002 Professional Edition
 * Microsoft Visio 2002 Standard Edition
 * Microsoft Office Professional Edition 2003
 * Microsoft Office Standard Edition 2003
 * Microsoft Office Student and Teacher Edition 2003
 * Microsoft Office Small Business Edition 2003
 * Microsoft Office Basic Edition 2003
 * Microsoft Office Access 2003
 * Microsoft Office Excel 2003
 * Microsoft Office FrontPage 2003
 * Microsoft Office Outlook 2003
 * Microsoft Office PowerPoint 2003
 * Microsoft Office Publisher 2003
 * Microsoft Office Word 2003

-



SUMMARY
This article describes how to use a batch file to silently install multiple GDI+ security updates for Microsoft Office programs to your computer with minimal required restarts.



INTRODUCTION
Administrators may want to install all required the GDI+ security updates in one batch process. Because some of the GDI+ security updates for Microsoft Internet Explorer 6.0 Service Pack 1 (SP1), for Microsoft Windows XP, for Microsoft Office XP, for Microsoft Visio 2002, for Microsoft Office 2003, and other Microsoft products are designed and packaged so that they have different installation properties, you can create and use a batch file to apply many updates at the same time to efficiently install multiple updates.

This article contains two sample batch files that can be easily modified with the correct path information so that multiple security updates can be installed without user intervention and without requiring a restart. The sample batch files that are included in this article are provided as examples only. The sample batch files are not intended to be examples for every possible combination of the GDI+ security updates that an administrator may want to install in one batch process. Each corporate environment will require specific batch files to update the Microsoft products that have been deployed for various desktop configurations. The software configurations that are included in this article cover an array of newer and older products that could be deployed in the corporate workplace today.

Note Batch file 1 is designed to update Internet Explorer 6.0 SP1 on computers that are running the Microsoft Windows 2000 operating system.

Important The information in this article is intended for IT professionals that are familiar with creating and using batch files. Although the information in this article is valid and provides IT professionals with one method to install multiple GDI+ security updates, it is not the recommended method for installing multiple GDI+ security updates. We recommend that you use the MS04-028 Enterprise Update Scanning Tool to scan computers for the required MS04-028 security updates and to apply any missing updates from a local area network (LAN) share.

For additional information about the MS04-024 Enterprise Update Scanning Tool, click the following article numbers to view the articles in the Microsoft Knowledge Base:

886988 How to obtain and use the MS04-028 Enterprise Update Scanning Tool in environments that do not use Systems Management Server

885920 885920 How to obtain and use the MS04-028 Enterprise Update Scanning Tool in environments that use Systems Management Server 2003 and Systems Management Server 2.0



MORE INFORMATION
Follow these steps to create either batch file 1 or batch file 2:  Download the updates that you require for the Microsoft products that are installed on your computer. Extract the update .msp files for each update that uses the OHotfix bootstrap utility. Create a new folder named GDIPlus on the C:\ partition. Copy all the required files, including the multiple .msp update files, in the GDIPlus folder that you created in step 3.

Note The required files for batch file 1 are listed in the &quot;Information for sample batch file 1, the GDIPlusWin2k.bat file&quot; section, and the required files for batch file 2 are listed in the &quot;Information for sample batch file 2, the GDIPlusWinXP.bat file&quot; section. Make sure that you copy the following three files that are used by the OHotfix bootstrap utility in the GDIPlus folder:  The OHotfix.exe file The OHotfix.ini file</li> The OHotfixr.dll file</li></ul> </li> Manually modify the OHotfix.ini file to enable verbose logging and quiet install. See the OHotfix.ini settings that are included in the batch file text later in this article.

Note OHotfix log files are stored at the following location:

c:\Documents and Settings\%Username%\Local Settings\Temp\OHotfix

</li> Create batch file 1 or batch file 2 by copying and pasting the appropriate script contents that follow these steps.</li> Confirm that the minimum requirements are met for all installed Microsoft products.</li> Run the batch file from a command-line or from System Management Software (SMS).</li> Use the Microsoft Knowledge Base articles that are in the &quot;References&quot; section to confirm that all the Gdiplus.dll and the Mso.dll updates are applied successfully.</li></ol>

Notes <ul> For additional information about how to install the GDI+ update on a computer that is running Microsoft Visio 2002 Service Release 1, click the following article number to view the article in the Microsoft Knowledge Base:

831932 Description of the Visio 2002 security update: September 14, 2004

</li> For additional information about how to install the GDI+ update on a computer that is running the original release version of Microsoft Project 2002, click the following article number to view the article in the Microsoft Knowledge Base:

831931 Description of the Microsoft Project 2002 security update: September 14, 2004

</li></ul>

Both 831932 and 831931 contain steps that describe how to manually edit the OHotfix.ini file to install the GDI+ update on those versions of the products.

Information for sample batch file 1, the GDIPlusWin2k.bat file
The following sample batch file, the GDIPlusWin2k.bat file, is for computers that are running Microsoft Windows 2000, Microsoft Windows 2000 Service Pack 2(SP2), Microsoft Windows 2000 Service Pack 3 (SP3), or Microsoft Windows 2000 Service Pack 4 (SP4).

Note This sample assumes that the following Microsoft Products are installed.

The following service packs for Microsoft Office XP, for Microsoft Project, and for Microsoft Visio must be installed as minimum requirements for the GDIPlus security update to apply successfully. Note that Microsoft Office 2003 Service Pack 1 (SP1), Microsoft Office Project 2003 Service Pack 1 (SP1), and Microsoft Office Visio 2003 Service Pack 1 (SP1) include the GDIPlus updates.
 * Microsoft Internet Explorer 6.0 Service Pack 1 (SP1)
 * Microsoft Office XP Service Pack 3 (SP3)
 * Microsoft Visio 2002 Service Pack 2 (SP2)
 * Microsoft Office Project 2003

The following are the minimum requirements for the GDIPlusWin2k.bat file:
 * Windows 2000 SP2, Windows 2000 SP3, or Windows 2000 SP4
 * Microsoft Windows Installer 2.0 or a later version
 * Office XP SP3
 * Visio 2002 SP2
 * Project 2003

The following are the required files for step 4 that is listed in the previous steps. Copy the following files in the GDIPlus folder:
 * The Ie6.0sp1-kb833989-x86-enu.exe file
 * The Ohotfix.exe file
 * The Ohotfix.ini file
 * The Ohotfixr.dll file
 * The Sharedff.msp file
 * The Visio2002-kb831932-gdi-fullfile.mspfile
 * The Visio2002-kb831932-mso-fullfile.mspfile
 * The Project2003-kb831931-fullfile.msp file

The GDIPlusWin2k.bat file
Copy the following script in a file that is named GDIPlusWin2k.bat: Start /wait c:\GDIPlus\IE6.0sp1-KB833989-x86-ENU.exe /q:a /r:n Start /wait c:\GDIPlus\OHotfix.exe Exit

REM /q:a (quiet administrator mode so NO progress bar and NO dialogs presented) REM /r:n (never restart the local computer) REM See 833989 for a complete listing of available switches REM The comments below are provided for information only. The OHotfix.ini file requires manual editing. REM This batch file is for systems running Windows 2000 SP2, SP3 or SP4 with Internet Explorer 6.0 SP1. REM See KB article 833989 for more information about this security update.

REM Multiple Installer update files (.msp) will run in alphabetical order using OHotfix.exe.

REM Manually change the OHotfix.ini settings listed below for silent update install with full verbose logging. REM Log files are always created to record the progress of ohotfix.exe and
 * the Windows Installer.

REM OHotfix.ini settings for quiet install Rem ShowSuccessDialog=0
 * A final dialog can be displayed to indicate that the update was applied
 * successfully. This dialog will only be displayed if ShowSuccessDialog is
 * set to 1 and OHotfixUILevel is set to n.
 * 1 = Display the success dialog box.
 * 0 = Do not display the success dialog box.

REM OHotfixLogLevel=v
 * v = Log all ohotfix.exe actions/messages.
 * n = Log only typical ohotfix.exe actions/messages.

REM MsiLogLevel=v
 * v = Log all Windows Installer information, including the verbose information (/L*v+).
 * n = Log Windows terminal properties and Windows Installer status messages,
 * nonfatal warnings, startup of actions, and error messages (/Lpiwae+).

REM OHotfixUILevel=q
 * The user interface level can be set for both ohotfix.exe and the Windows
 * Installer service.
 * n = Display ohotfix.exe messages.
 * q = Do not display ohotfix.exe messages.

REM MsiUILevel=q
 * n = Display the basic Windows Installer user interface.
 * q = Do not display any Windows Installer user interface.

Information for sample Batch file 2, the GDIPlusWinXP.bat file
The following sample batch file, the GDIPlusWinXP.bat file, is for computers that are running Microsoft Windows XP Service Pack 1 (SP1).

Note This sample assumes that the following Microsoft Products are installed.

The service packs that are listed here for Office XP, for Project, and for Visio must be installed as minimum requirements for the GDIPlus security update to apply successfully. Pease note that Microsoft Office 2003 SP1, Microsoft Office Project 2003 SP1, and Microsoft Office Visio 2003 SP1 includes the GDIPlus updates.
 * Microsoft Office 2003 Professional
 * Microsoft Project Standard 2002 Service Pack 1 (SP1)
 * Microsoft Visio Professional 2002 Service Pack 2 (SP2)

The following are the required files for step 4 that is listed in the previous steps. Copy the following files in the GDIPlus folder:
 * The Windowsxp-kb833987-x86-enu.exe file
 * The Ohotfix.exe file
 * The Ohotfix.ini file
 * The Ohotfixr.dll file
 * The Gdiplus-fullfile-glb.msp file
 * The Project2002-kb831931-fullfile.msp file
 * The Visio2002-kb831932-gdi-fullfile.msp file
 * The Visio2002-kb831932-mso-fullfile.msp file

The GDIPlusWinXP.bat file
Copy the following script in a file that is named GDIPlusWinXP.bat: Start /wait c:\GDIPlus\WindowXP-KB833987-x86-ENU.exe /quiet /norestart Start /wait c:\GDIPlus\OHotfix.exe Exit

REM The comments below are provided for general information only. REM This batch file is for systems running Windows XP & SP1 REM See KB article 833987 for more information about this security update for Windows XP systems.

REM Multiple Installer update files (.msp) will run in alphabetical order using OHotfix.exe.

REM OHotfix.ini settings for quiet install REM ShowSuccessDialog=0
 * A final dialog can be displayed to indicate that the update was applied
 * successfully. This dialog will only be displayed if ShowSuccessDialog is
 * set to 1 and OHotfixUILevel is set to n.
 * 1 = Display the success dialog box.
 * 0 = Do not display the success dialog box.

REM OHotfix.ini is configured for silent update install with full verbose logging. REM Log files are always created to record the progress of ohotfix.exe and REM OHotfixLogLevel=v
 * the Windows Installer.
 * v = Log all ohotfix.exe actions/messages.
 * n = Log only typical ohotfix.exe actions/messages.

REM MsiLogLevel=v
 * v = Log all Windows Installer information, including the verbose information (/L*v+).
 * n = Log Windows terminal properties and Windows Installer status messages,
 * nonfatal warnings, startup of actions, and error messages (/Lpiwae+).

REM OHotfixUILevel=q
 * The user interface level can be set for both ohotfix.exe and the Windows
 * Installer service.
 * n = Display ohotfix.exe messages.
 * q = Do not display ohotfix.exe messages.

REM MsiUILevel=q
 * n = Display the basic Windows Installer user interface.
 * q = Do not display any Windows Installer user interface.

<div class="references_section">