HOW TO: Customize the Office XP Removal Process by Modifying the Oclncust.opc File (309125)



The information in this article applies to:

  • Microsoft Office XP Professional
  • Microsoft Office XP Standard
  • Microsoft Office XP Students and Teachers
  • Microsoft Office XP Developer

This article was previously published under Q309125

SUMMARY

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 programs. You can also run the Removal Wizard on its own. This article describes how you can customize the removal process by modifying the Oclncust.opc file.

back to the top

Modify the Oclncust.opc File for a Custom Removal Routine

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

NOTE: The Microsoft 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 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 the support files Chartsub.dll, Chartprt.dat, and Readme.txt.

To modify the Oclncust.opc file 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.
back to the top

Troubleshooting

Test your customized OPC file on a computer by running the following command:

path\OFFCLN.EXE /L!C:\Offcln.log path to OPC files\

This step generates a log of the files that your customized OPC file will delete, without actually removing any files.

NOTE: For a list of command-line options, run OFFCLN.EXE /?.

back to the top

Modification Type:MinorLast Reviewed:12/14/2005
Keywords:kbHOWTOmaster KB309125 kbAudITPro