Microsoft Office 2003 Editions Resource Kit (Pro-Resource Kit)

When you upgrade to Microsoft Office 2003, 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 setting options in a transform (MST file). You can also customize the OPC file so that only the files and components that you specify are removed.

On the Resource Kit CD

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

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

Removing previous versions during Setup

When users install Office 2003, 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 2003 that you are installing.

For example, if you are installing the stand-alone version of Microsoft Office Word 2003 over Microsoft Office XP Professional, only Word 2002 is removed by default during the update process. If you run Setup with a full user interface, users can choose which previous-version applications to remove.

Note

The Setup user interface allows users to keep or remove all previous versions of a particular application. However, you can use the Custom Installation Wizard or stand-alone Removal Wizard to select particular versions to keep or remove. For example, you can keep Word 2000 but remove Word 97.

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

Note

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

In addition, Setup detects the following products to avoid deleting shared files that overlap with 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 Microsoft Excel. If all the core applications are removed, Setup also removes shared components such as Office Binder and Equation Editor.

Setup also detects the following as candidates for removal:

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

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 installation image.

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.

Removing Small Business Tools

Office 2003 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 2003 Setup to remove Small Business Tools during the installation, set the following properties on the command line, in Setup.ini, or in a transform:

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:

On the Resource Kit CD

The Office 2003 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 Appendix A, “Toolbox.”

Customize removal behavior in a transform

You can use the Custom Installation Wizard to customize removal behavior during Office 2003 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.

For more information about customizing the OPC files, see “OPC File Syntax” in the Appendix B, “Office 2003 Resource Kit Reference.”

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 libraries (DLLs) 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:

Note

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:

Caution

Never run the Removal Wizard in aggressive mode after you install Office 2003. 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 and Office XP. This behavior results in a cleaner and safer removal of Office 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, Offcln11.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:

Tip

The Removal Wizard returns a value to indicate whether the wizard ran with any errors. If you create a batch file to run the wizard, you can include code that captures this value. The wizard returns 0 to indicate that no errors occurred; any other value indicates errors.

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 2003 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.

  3. Add the following lines:

    [SAFE] "Internal charting tool"C:\program files\internal\chart\chart.exeC:\program files\internal\chart\chartsub.dllC:\program files\internal\chart\chartprt.datC:\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

Категории