Removal Wizard
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
- Create a copy of the default OPC file (Offcln9.opc), and name it Newopc.opc.
- 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.
- In the definitions section, define the following values:
TEMPFOLDERCONTENTS = REMOVE
TEMPTWIDDLEFILESONLY = REMOVE
- 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.
- 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 which is available in the Office Information section OffInfo.exe download. You can find this downloadable file on the Office 2000 Resource Kit Downloads page.
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.