microsoft.com Home  
Microsoft
http://www.microsoft.com/office/ork  
Microsoft Office 2000 Resource Kit Home
 Deploying Office 2000
 Installing Office 2000 in Your Organization
 Installing Special Configurations of Office 2000
 Customizing Your Office 2000 Installation
 Behind the Scenes - Office 2000 Installation Tools
Office Setup Program
Office Custom Installation Wizard
Profile Wizard
Removal Wizard
 Overview of Tools and Utilities
Glossary
Index
Removal Wizard

How to Create a Custom Removal Routine

There are several ways that you can specify how the removal routine in the Microsoft Removal Wizard or Office Setup program cleans up users’ computers:

  • Customize the default OPC file (Offcln9.opc), which is used by Office Setup. When users run Office Setup, your custom removal routine automatically runs.
  • Create your own OPC file and run the Removal Wizard with a command-line option indicating your custom OPC file name.
  • In the Office Custom Installation Wizard, specify which Office components to keep on the Remove Previous Versions panel.

Use a custom OPC file and command-line options

Creating a custom OPC file and running the Removal Wizard with command-line options gives you the greatest amount of flexibility. For example, you can create a command that automatically does the following on users’ computers:

  • Runs the Removal Wizard without user intervention (quiet mode)
  • Removes all files from previously installed versions of Office (aggressive mode)
  • Empties temporary folders
  • Restarts the computer automatically

In addition, suppose you want to remove an internal company tool that is being replaced by Office 2000 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 OPC file for a custom removal routine

  1. Create a copy of the default OPC file (Offcln9.opc), and name it Newopc.opc.
  2. Open Newopc.opc in a text editor.

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

  3. In the definitions section, define the following values:

    TEMPFOLDERCONTENTS = REMOVE
    TEMPTWIDDLEFILESONLY = REMOVE

  4. At the beginning of the Commands section (immediately before the [TEMPTWIDDLEFILESONLY] command) 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

    This step ensures that the wizard detects the specified files.

  5. Save and close Newopc.opc.

Toolbox   Information about the syntax of the OPC file and instructions for modifying the OPC file are included in the Word document OPC.doc. For information about installing OPC.doc, see Office Information.

Top

Test and distribute your custom removal routine

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 are deleted by your customized OPC file.

To run your custom OPC file on users’ computers, distribute Newopc.opc, along with the Removal Wizard (Offcln9.exe and Oclean9.dll). Instruct users to run the wizard by using the Run command on the Start menu with the following command line:

Offcln9.exe /a /q /r Newopc.opc

Tip   You can also create a batch file that includes the correct command-line string. Distribute the batch file to users as part of an e-mail message or logon script.


Topic Contents
Previous

Topic Contents   |   Previous   |   Top

  Friday, March 5, 1999
© 1999 Microsoft Corporation. All rights reserved. Terms of use.

License