Microsoft® Office XP Resource Kit

microsoft.com Home  
Microsoft
http://www.microsoft.com/office/ork  

    Office Resource Kit
    Toolbox
    Getting Started
    Deployment
    Maintenance
    Worldwide Deployment
    Messaging
    Site Index
    Glossary
Office Resource Kit / Deployment / Installing & Customizing Office
Topics in this chapter
  Creating an Administrative Installation Point  
  Customizing the Office Installation  
  Customizing How Setup Runs  
  Customizing Office Features and Shortcuts  
  Customizing User-defined Settings  
  Including Additional Packages in the Office Installation  
  Customizing Removal Behavior  
  Distributing Office to Users' Computers  
  Deploying a Service Release  
 

Customizing Removal Behavior

When you upgrade to Microsoft Office XP, the Removal Wizard (Offcln.exe) removes unnecessary or obsolete components from previously installed versions of Office and related applications. The wizard components run behind the scenes during Setup, but you can also run the Removal Wizard on its own.

Both the wizard and the Office Setup program use the same logic and the same text file (OPC file) to detect and remove unneeded or obsolete files and settings from users' computers. You can determine which previous versions of Office applications are removed by selecting options in a transform. You can also customize the OPC file so that only the files and components that you specify are removed.


Toolbox   The Office XP Resource Kit includes the same stand-alone Removal Wizard (Offcln.exe) that is included with Office XP. The Removal Wizard is installed by default when you run the Office Resource Kit Setup program. For more information, see Removal Wizard in the Toolbox.


Removal Wizard components (which are used by both the wizard and Setup) include the following files:

  • Offcln.exe

    Provides the user interface that lets you run the wizard as a stand-alone utility; located in the \Files\Pfiles\MSOffice\Office10 folder on the administrative installation point. The wizard is also available in the Office XP Resource Kit.

  • Oclean.dll

    Used by the stand-alone Removal Wizard and Setup to carry out instructions in the OPC files and clean up the user's hard disk.

  • Oclncore.opc

    Global OPC file for Office XP; located in the \Files\Pfiles\MSOffice\Office10 folder on the administrative installation point. This file specifies files, registry entries, INI file settings, and shortcuts associated with all components in the core English version of Office XP.

  • Oclnintl.opc

    Satellite OPC file for each language version of Office XP; located in the LCID subfolders. Specifies files, registry entries, INI file settings, and shortcuts associated with a particular language version of Office XP.

  • Oclncust.opc

Template file for adding additional content to be deleted by the Removal Wizard, including all content that was commented out in previous versions of the wizard; located in the \Files\Pfiles\MSOffice\Office10 folder on the administrative installation point. Modify this file if you want to delete additional files or registry keys.

Removing previous versions during Setup

When users install Office XP, Setup detects files, settings, and shortcuts from previously installed versions of Office and removes them. When you run Setup in quiet mode (/q), default Setup behavior removes all previous versions of Office applications that are also included in the version of Office XP that you are installing. For example, if you are installing the stand-alone version of Word 2002 over Microsoft Office 2000 Premium, only Word 2000 is removed by default during the update process. If you run Setup with a full user interface, users can choose which previous versions to remove.

Setup can detect and remove the following versions of Office and Office-related products:

  • Microsoft Office 4.x, Office 95, Office 97, Office 2000

  • Microsoft Outlook 97, Outlook 98, Outlook 2000 (does not include Outlook Express)

  • Microsoft FrontPage 1.1, FrontPage 97, FrontPage 98, FrontPage 2000

  • Microsoft Publisher 2.0, Publisher 95, Publisher 97, Publisher 98, Publisher 2000

  • Microsoft Project 4.0, Project 95, Project 97, Project 98, Project 2000

  • Microsoft Office 2000 MultiLanguage Packs

    Language packs are removed by default only if all other Office 2000 applications are also being removed.

  • Obsolete files, including orphaned files, registry settings, Start menu shortcuts, and INI file settings used by any previously installed edition of Office applications.


Note   Setup does not remove documents or other user files from the user's hard disk.


Setup also detects the following as candidates for removal:

  • Incompletely installed or uninstalled components that leave unusable files on the hard disk

  • Files that begin with the tilde (~) character

Finally, Setup detects and can remove temporary files, which are defined as files found in any of the following folders:

  • Windows temporary folder (Windows\Temp or Windows\Tmp)

  • Folders identified by the MS-DOS environment variable %TEMP% or %TMP%

  • MS-DOS temporary folder (drive:\Temp or drive:\Tmp); Setup searches every drive on the computer.

Setup removes files according to instructions contained in the global OPC file (Oclncore.opc) plus any language-specific OPC files (Oclnintl.opc) that you add to the LCID subfolders on your administrative installation point.

For example, a user might have a French version of Microsoft Word and an English version of Microsoft Excel. The global OPC file cleans up all components included in the core English version of Office. If you add the Oclnintl.opc file to the 1036 subfolder, then Setup also removes components unique to the French version of Office.


Note   Because Setup recognizes components at the application level, the removal process detects and removes stand-alone versions of applications such as Word and Excel. If all the core applications are removed, Setup also removes shared components such as Office Binder and Equation Editor.


Removing Small Business Tools
Office XP does not include the Microsoft Small Business Tools programs (Small Business Customer Manager, Business Planner, Direct Mail Manager, and Financial Manager) that were part of Microsoft Office 2000 Premium Edition. If you are upgrading from Office 2000, Small Business Tools components are not removed by default.
If you want Office XP Setup to remove Small Business Tools during the installation, set the following properties on the command line, in Setup.ini, or in a transform:
  • OPCREMOVESBT2000

    Setting this property to 1 allows Office XP Setup to remove Small Business Tools from users' computers.

  • OPCREMOVESBTTEXT

    Setting this property to a string value — for example, "&Small Business Tools" — adds a check box to the Remove Previous Versions page of Setup so that users can choose to remove Small Business Tools the same way they remove any other previous-version Office application.


Customizing the removal process

There are several ways that you can specify how the Setup program for Office or the Removal Wizard cleans up users' computers:

  • In the Custom Installation Wizard, specify which Office components to remove on the Remove Previous Versions page.

  • Customize the OPC file used by Setup to include or exclude additional files or registry entries during the removal process. When users run Setup, your custom removal routine runs automatically.

  • Create your own OPC file and run the Removal Wizard with a command-line option that specifies your custom OPC file.


Toolbox   The Office XP Resource Kit includes the Custom Installation Wizard, which is installed by default when you run the Office Resource Kit Setup program. For more information, see Custom Installation Wizard in the Toolbox.


Customize removal behavior in a transform

You can use the Custom Installation Wizard to customize removal behavior during Office XP Setup. On the Remove Previous Versions page of the wizard, you specify exactly which previous versions of each application are removed from users' computers. In this case, Setup does not display the Remove Previous Versions page to users during the installation — the instructions in the transform are carried out regardless of the display setting.


Note   When you remove previous applications during Setup, the Removal Wizard always runs in safe mode.


Customize the OPC file used by Setup

Setup follows the instructions in the global OPC file and any language-specific OPC files to determine which components to remove. The OPC files identify files, registry entries, INI file entries, and Start menu items that were installed or modified by previously installed versions of Office and Office-related products. The OPC file also contains rules that describe which of these files or entries to remove, where they are located, and under what conditions they can be deleted.

By editing the default OPC file or by creating a custom OPC file, you can specify which components to remove from the users' computers. You can also use the OPC file to remove non-Office components, such as custom applications. To add components to the removal list, customize the Oclncust.opc file. To exclude components from removal, you must edit the default Oclncore.opc file.


Toolbox   The Office XP Resource Kit includes a document named Opc.doc, which contains information about the syntax of the OPC file and instructions for modifying it. Opc.doc is installed by default when you run the Office Resource Kit Setup program. For more information, see Supplemental Documentation in the Toolbox.


Run the Removal Wizard separately

After Setup removes files and settings from previously installed versions of Office or Office components, other unneeded files might remain on users' computers. For example, font files and dynamic-link library (DLL) files might not be removed. You can run the Removal Wizard as a stand-alone utility to remove all Office-related files from users' computers.

Situations in which it makes sense to run the Removal Wizard as a stand-alone utility include the following:

  • Before you upgrade to Office XP, to clean up existing Office-related files.

  • When you stage your upgrade to Office XP applications.

    For example, if you upgrade to Word 2002 before upgrading to the rest of Office XP, you can remove previously installed versions of only Word.

  • When upgrading to Office XP replaces the need for a custom application on users' computers. You can use the wizard to remove the custom application.


Note   On the Microsoft Windows 2000 and Microsoft Windows NT 4.0 operating systems, you must have administrator rights to run the Removal Wizard. If a user does not have administrator rights, you must log on as an administrator and run the wizard with the proper permissions.


You can run the Removal Wizard in one of three modes, depending on the degree to which you want to clean up users' hard disks:

  • Aggressive mode

    Removes all Office-related components, including components shared by more than one Office application. Before installing Office XP, you might run the wizard in aggressive mode for users who are upgrading from a variety of Office versions. In aggressive mode, the wizard marks all items listed in the OPC file for removal.

  • Safe mode

    Removes only components that are no longer needed. Components deleted in safe mode are not being used by any application. In safe mode, the wizard marks items listed in the OPC file for removal only if it does not detect a corresponding application.

  • Safe mode with user discretion

    Runs in safe mode, but allows users to select which detected applications to keep and which to delete.


Caution   Never run the Removal Wizard in aggressive mode after you install Office XP. The wizard might remove shared components that are needed by other applications installed on the computer.


The final page of the Removal Wizard lists all files scheduled for removal. This list is accurate for all Office applications from Microsoft Office 97 or earlier. However, because the Removal Wizard relies on Windows Installer to manage removal of files associated with a particular application, the list might be incomplete for Office 2000. This behavior results in a cleaner and safer removal of Office 2000 files, even though the list in the Removal Wizard might be incomplete.

Using command-line options with the Removal Wizard

Creating a custom OPC file and running the Removal Wizard with command-line options gives you the greatest amount of flexibility. To run the Removal Wizard with command-line options, click Run on the Start menu, and then type Offcln.exe followed by the command-line options you want.

Removal Wizard command-line options use the following syntax:

Offcln.exe [/a | /s [/q[/r]] [/l][!][logfile]]] [directory]

These command-line options are defined in the following table.

Option Definition
/a Indicates aggressive mode; the Removal Wizard removes files associated with all previously installed versions of Office and Office-related applications. When you use this command-line option, the wizard does not allow you to select which files to keep.
/s Indicates safe mode; the Removal Wizard removes only those files for which it does not detect an associated application. When you use this command-line option, the wizard does not allow you to select which files to keep.
/q Indicates quiet mode; the Removal Wizard runs without prompting the user for information or displaying progress indicators. The wizard does not restart the user's computer; therefore, changes might not be completed until the user restarts the computer.
/r Used with the /q option to restart the computer automatically if necessary. The user has no opportunity to save files before the computer restarts.
/llogfile Generates a log with the file name logfile. If no log file name is specified, the Removal Wizard creates a default log file, Offcln9.log, in the current folder of the wizard.
/l!logfile Generates a log file in the same manner as /l, but the Removal Wizard does not perform the removal process. This option is useful to test the Removal Wizard before running it to remove files.
directory Specifies the folder that contains the files used by the Removal Wizard: Oclncore.opc, Oclncust.opc, and <LCID>\Oclnintl.opc files. By default, the Removal Wizard searches the same folder that contains Offcln.exe.

For example, you can enter the following command line:

Offcln.exe /a /q /r /l

This command line does the following on users' computers:

  • Removes all files from previously installed versions of Office (/a)

  • Runs the Removal Wizard without user intervention (/q)

  • Restarts the computer automatically if needed (/r)

  • Creates the default log file (/l)


Tip   The Removal Wizard returns a code to indicate whether the wizard ran with any errors. If you create a batch file to run the wizard, you can include error-checking code so that the wizard returns 0 to indicate that errors occurred or returns 1 to indicate that no errors occurred.


Running the Removal Wizard with a custom OPC file

When you run the Removal Wizard separately, you can create a custom OPC file that controls the removal process. For example, suppose you want to remove an internal company tool that is being replaced by Office XP functionality. The internal tool, Chart.exe, resides on users' computers in the folder C:\Program Files\Internal\Chart. In addition, the folder contains support files — Chartsub.dll, Chartprt.dat, and Readme.txt. The following procedure shows you how to modify the OPC file to accomplish all these aims.

To modify the Oclncust.opc for a custom removal routine

  1. Create a backup copy of the default Oclncust.opc file.

  2. Open Oclncust.opc in a text editor.

    In Microsoft Windows 98, this file is too large for Notepad, but it can be edited in WordPad.

  3. Add the following lines:

    [SAFE] "Internal charting tool"

    C:\program files\internal\chart\chart.exe

    C:\program files\internal\chart\chartsub.dll

    C:\program files\internal\chart\chartprt.dat

    C:\program files\internal\chart\readme.txt

    These entries direct the wizard to always delete files in the [SAFE] section and specify the name and location of the files to delete.

  4. Save and close Oclncust.opc.


Tip   Test your customized OPC file on a computer by using the /l!logfile command-line option. This step generates a log of the files that will be deleted by your customized OPC file without actually removing any files.



Top

 
© 2001 Microsoft Corporation. All rights reserved. Terms of use.
License