microsoft.com Home  
Microsoft
http://www.microsoft.com/office/ork  
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:

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:

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.



Top


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

License