Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Office 2003 Resource Kit
Search
Search
 
Check for updates: (c) Microsoft
Office downloads
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
OPC File Syntax
 

The Removal Wizard (Offcln.exe) and the Microsoft® Office 2003 Setup program use OPC files to remove unnecessary or obsolete components from previously installed versions of Office and related applications.

The following OPC files come with Office 2003:

  • Oclncore.opc

    Global OPC file; located in the \Files\Pfiles\MSOffice\Office 2003 folder on the administrative installation point. Specifies components associated with the core English version of Office 2003. To exclude components from removal, edit the default Oclncore.opc file.

  • Oclncust.opc

    Template file for adding additional content to be deleted by the Removal Wizard; located in the \Files\Pfiles\MSOffice\Office 2003 folder on the administrative installation point. To add components to the removal list, customize the Oclncust.opc file.

  • Oclnintl.opc

    Satellite OPC file for each language version of Office 2003; located in the LCID subfolders. Specifies language-specific components of Office 2003.

You can customize the removal process by modifying Oclncore.opc or by creating a new OPC file. For more information about customizing removal behavior during Setup or when running the stand-alone Removal Wizard, see Customizing Removal Behavior.


 Note    The OPC files that come with Microsoft Office 2003 also remove shared files for previous versions of Microsoft Office Project 2003. However, the OPC files that come with Project 2003 (also named Oclncore.opc, Oclncust.opc, and Oclnintl.opc) have been customized to remove Project files and as well as shared Office components.


[Definitions] section

Specify the value of dependency variables. Dependency variables identify which applications or groups of files are candidates for removal. The [Definitions] section appears only in Oclncore.opc and uses the following syntax:

dependency variable=value

Values

  • KEEP

    Do not delete files. The values FALSE and EXIST are equivalent to KEEP and can be used in the OPC file.

  • REMOVE

    Always delete files. The values TRUE and NoteXIST   are equivalent to REMOVE and can be used in the OPC file.

  • DETECT

    Detect the presence of an application and determine whether Setup or the user has specified that application for removal. Files from previous versions are removed by default, unless the user has chosen to keep them.

Dependency variables

Dependency variables represent an application or set of files. Offcln.exe recognizes the following dependency variables:

Office XP applications and components

ACCESS10 ARTGALLERY10 DAO10
EQUATION10 EXCEL10 FRONTPAGE10
GRAPH10 MSDRAW10 MSINFO10
MSQUERY10 OFFICE10 OUTLOOK10
POWERPOINT10  PUBLISHER10 WORD10

Office 2000 applications and components

ACCESS9 ARTGALLERY9 BINDER9
DAO9 EQUATION9 EXCEL9
FRONTPAGE9 GRAPH9 MSINFO9
MSQUERY9 OFFICE9 OUTLOOK9
POWERPOINT9   PUBLISHER9 WORD9

Office 97 applications and components

ACCESS97 ACCESS97RT ARTGALLERY97
BINDER97 DAO97 DMM97
EQUATION97 EXCEL97 GRAPH97
MSINFO97 MSQUERY97 OFFICE97
OUTLOOK97 PHOTOED97 POWERPOINT97
SBFM97 SCHEDULE97 WORD97

Office 95 applications and components

ACCESS95 ACCESS95RT ARTGALLERY95
BINDER95 BOOKS95 EQUATION95
EXCEL95 GRAPH95 IMAGER95
MSINFO95 MSQUERY95 POWERPOINT95
SCHEDULE95 WORD95 WORDART95

Other applications

ARTGALLERY98 FRONTPAGE1X FRONTPAGE97
FRONTPAGE98 HAGAKI1 HAGAKI2
HAGAKI3 HAGAKI4 HAGAKI5
MSDRAW9 MSDRAW97 MSDRAW98
ORGCHART1 ORGCHART2 PHOTODRAW1
PHOTODRAW2 PROJECT10 PROJECT9
PROJECT95 PROJECT98 PUBLISHER3
PUBLISHER4 PUBLISHER5 TEAMMANAGER97
WORDART98

Special cleanup operations

The following keywords represent applications or files that the Removal Wizard does not detect by default; however, they can be set to KEEP or set to REMOVE to be removed in aggressive mode.

BUTTON94 CLIPART94 CLIPART95
DAO95 FONTS94 FONTS95
GRPHFLT97 GRAPHFILTER94  GRPHFLT95
OFFICEGENERIC95 OFFICEHELP95 PROOF94
PROOF95 SOUNDS95 SYSTEM94
SYSTEM95 TEXTCONV94 TEXTCONV95
WINDOWS94 WINDOWS95

You can also change the value of the following dependency variables:

  • TEMPFOLDERCONTENTS

    Default value is KEEP. To remove files from temporary folders, set to REMOVE.

  • TEMPTWIDDLEFILESONLY

    Default value is KEEP. To remove files from temporary folders that begin with a tilde (~), set to REMOVE. These files are deleted by an application when it closes and are usually safe to remove.


 Note    You cannot add new dependency variables to Oclncore.opc. Offcln.exe recognizes only the dependency variables listed in the [Definitions] section. You can only change the default values.


[Commands] section

Determine the actions to execute on specified files during the removal process. This section consists of a series of commands with the following syntax:

[command instruction, dependency variables] "description"
action
action

Command instruction

  • RISKY

    In aggressive mode, execute the actions in the command; in safe mode, skip the command. Typically used for shared files and database drivers, which may affect other applications.

  • SAFE

    Always execute the actions in the command.

Dependency variables

List of one or more dependency variables from the [Definitions] section of Oclncore.opc. You can customize the list of dependency variables in the command to add or exclude files. Separate multiple dependency variables with commas.

Offcln.exe uses the following logic to determine whether to perform the actions in the command:

  • If all the dependency variables in the dependency list have the value REMOVE, then Offcln.exe executes the actions listed in the command.
  • If any dependency variable has the value KEEP, then Offcln.exe skips the command entirely.
  • If a dependency variable has the value DETECT, Offcln.exe changes it to either REMOVE in aggressive mode or KEEP in safe mode and then executes or skips the command accordingly.

Description

Describe the files represented by the dependency variables listed in the command. This string is displayed in the Files You Can Remove page of the Removal Wizard.


 Note    You cannot begin a description with a space. You cannot use a tab character or quotation mark (") anywhere in the string.


Actions

Determine what actions to perform on the files represented by the dependency variables. You can add, modify, or remove actions.

To help ensure that an action is always performed, create a new command in Oclncust.opc and add the command instruction SAFE without a list of dependency variables. Actions listed in this command are executed regardless of the values specified in the [Definitions] section.


 Note    In many actions, you can use a predefined keyword to represent a commonly used folder instead of entering an explicit path. For a list of keywords and corresponding folders, see the "Keywords" section later in this topic.


Application INI Entry

Specify a section or line to remove from an INI file for any application. Use the following syntax:

INI=folder\file,section,key
folder Fully qualified path or predefined folder keyword.
file INI file name.
section Section name from INI file.
key A line in the INI file that contains this key is deleted. If the key is not present, the entire section is deleted. Optional.

File

Specify files to be removed. Use the following syntax:

[KEYWORD][path]\file ["description"]
KEYWORD Predefined folder keyword; optional. Use all uppercase letters. If you enter a partial path without specifying a keyword, the previous keyword is used.
path A fully qualified path. Optional if the KEYWORD value includes the full path.
file Name of the file to remove.
description String that describes the file to remove; optional.

In the following example, the action deletes MyTemplate.dot and all batch and bitmap files in the Custom folder under the Microsoft Word 97 folder.

WORD97DIR\Custom\MyTemplate.dot
\Custom\*.bat
\Custom\*.bmp

Menu Item

Remove an item on the Start menu. Use the following syntax:

MENU_ITEM=group\item
group Name of the Program\Start Menu group.
item Item to remove.

Example:

MENU_ITEM=Microsoft FrontPage\Personal Web Server

Registry Entry

Remove an entry from the Microsoft Windows registry. Use the following syntax:

HKxx\key
HKxx Top-level registry key, defined as follows:
  • HKLM for HKEY_LOCAL_MACHINE
  • HKCR for HKEY_CLASSES_ROOT
  • HKCU for HKEY_CURRENT_USER
  • HKUR for HKEY_USERS
key Subkey or value entry to remove

Example:

HKLM\Software\Microsoft\Windows\Currentversion\Uninstall\WordView

 Note    Dependency variables associated with Office XP and Office 2000 do not list all the registry keys that are removed when Office is removed. During the removal process, Offcln.exe calls Windows Installer to remove the product or application, and Windows Installer automatically deletes the appropriate registry keys.


SharedDLL File

Remove a dynamic-link library (DLL) or other shared file. This action removes the registry entry associated with the application. Use the following syntax:

SHAREDDLL=folder\file
folder Predefined folder keyword or fully qualified path for the shared file; stored in the subkey HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\SharedDLLs
file Name of the shared file.

Examples:

SHAREDDLL=OFFICE97DIR\msroute.dll
SHAREDDLL=OFFICE97DIR\hlink.srg
SHAREDDLL=OFFICE97DIR\osa.exe

Shortcut File

Remove a shortcut to a file by deleting the LNK file. You can specify a version number so that only shortcuts to a particular version of the file are removed.

In this action, you specify the target file rather than the LNK file itself; this ensures that shortcuts are removed regardless of how they have been renamed or moved. You can also specify a new Windows Installer component for the LNK file, to update the shortcut instead of removing it.

Use the following syntax:

SHORTCUT=folder\target_file | feature | 
version | component | command line
folder Predefined folder keyword or fully qualified path.
target_file Name of the target file that the LNK file points to.
feature Windows Installer feature associated with the file.
version Version number of the target file. If you specify a version, shortcuts to other versions are not removed.
component Windows Installer component to which the updated shortcut should point.
command line Command line included in the LNK file. Offcln.exe removes the LNK file only if it contains this command line.

The following example removes any LNK file in the Start\Programs\Office folder that points to Microsoft Excel 2000:

SHORTCUT=SYSMENUPROGRAMSDIR\Office\Excel.exe||9

This example finds any LNK file in the Start\Programs\Office folder that points to Excel 2000 and updates it to point to Microsoft Office Excel 2003.

SHORTCUT-SYSMENUPROGRAMSDIR\Office\excel.exe||
9|Global Excel Core

Special Action

Use predefined special functions to remove files. Use the following syntax:

SPECIAL\function
Function Description
RemoveTempFiles Remove all files from the following temporary folders:
  • Windows\Temp
  • Windows\Tmp
  • %Temp%
  • %Tmp%
  • drive:\Temp
  • drive:\Tmp
RemoveTwiddleTempFiles Remove all files with a tilde (~) as the first character in the temporary folders listed above.
RemoveOffice95ShortcutLnksAndTmps Remove LNK, TMP, and PIF files in the Office 95 Shortcut Bar folder.
RemoveDuplicateWWINTL32DLL Remove Wwintl32.dll from the Windows\System folder if it is also present in the Word 95 folder.

User Modifiable File

Remove an Office file that can be customized by the user, such as a template or sample document. Use the following syntax:

USER_MODIFIABLE_FILE=folder\file
folder Predefined folder keyword or fully qualified path.
file Name of file to remove.

Example:

USER_MODIFIABLE_FILE=ACCESS95DIR\samples\orders.mdb

Win.ini Entry

Remove a section or key from the Win.ini file. Use the following syntax:

Win.ini, section, key
section Win.ini section to remove.
key Any line in Win.ini that contains this key is deleted. If the key is not present, the entire section is removed. Optional.

Keywords

Predefined keywords represent commonly used folders. You can use a keyword instead of an explicit path. Keywords must be entered in all uppercase letters.

Keywords and their corresponding folders are listed in the following table.

Keyword Folder
ACCESS10DIR Access 2002 folder
ACCESS9DIR Access 2000 folder
ACCESS97DIR Access 97 folder
ACCESS95DIR Access 95 folder
BOOKS95DIR Bookshelf® 95 folder
CLIPART97DIR Office 97 Clip art folder
DMM97DIR Direct Mail Manager 97 folder
EXCEL10DIR Excel 2002 folder
EXCEL9DIR Excel 2000 folder
EXCEL97DIR Excel 97 folder
EXCEL97VIEWERDIR Excel 97 Viewer folder
EXCEL95DIR Excel 95 folder
EXCEL95VIEWERDIR Excel 95 Viewer folder
FRONTPAGE10DIR FrontPage® 2002 folder
FRONTPAGE9DIR FrontPage 2000 folder
FRONTPAGE98DIR FrontPage 98 folder
FRONTPAGE97DIR FrontPage 97 folder
FRONTPAGE1XDIR FrontPage 1.1 folder
IMAGER95DIR Microsoft Imager 95 folder
MSAPPS9XDIR Shared application files folder for Office 2000
OFFICE10DIR Office folder under Office XP folder
OFFICE9DIR Office folder under Office 2000 folder
OFFICE97DIR Office folder under Office 97 folder
OFFICE95DIR Office folder under Office 95 folder
OFFICEROOT10DIR Office 2002 folder
OFFICEROOT9DIR Office 2000 folder
OFFICEROOT97DIR Office 97 folder
OFFICEROOT95DIR Office 95 folder
OUTLOOK10DIR Outlook® 2002 folder
OUTLOOK9DIR Outlook 2000 folder
OUTLOOK97DIR Outlook 97 folder
OUTLOOK9798DIR Outlook 97 or 98 folder
POWERPOINT10DIR PowerPoint® 2002 folder
POWERPOINT9DIR PowerPoint 2000 folder
POWERPOINT97DIR PowerPoint 97 folder
POWERPOINT97VIEWERDIR PowerPoint 97 Viewer folder
POWERPOINT95DIR PowerPoint 95 folder
POWERPOINT95VIEWERDIR PowerPoint 95 Viewer folder
PUBLISHER10DIR Publisher 2002 folder
PUBLISHER5DIR Publisher 5.0 folder
PUBLISHER4DIR Publisher 4.0 folder
PUBLISHER3DIR Publisher 3.0 folder
ROOTDIR Root of all local hard drives.
ROOT97DIR Root folder of the hard disk containing Office 97
ROOT95DIR Root folder of the hard disk containing Office 95
SBFM97DIR Small Business Financial Manager 97 folder
SCHEDULE97DIR Schedule+ 97 folder
SCHEDULE95DIR Schedule+ 95 folder
SOUNDS97DIR Shared sound files folder for Office 97
SOUNDS95DIR Shared sound files folder for Office 95
SYSAPPDATADIR Application Data folder
SYSDESKTOPDIR System and user-specific desktop folders
SYSDIR Windows System folder
SYSMENUPROGRAMSDIR Programs folder below Start Menu folder
SYSMENUROOTDIR Windows Start Menu folder
SYSMENUSTARTUPDIR Startup folder under Start Menu\Programs folder
SYSPROGRAMFILESDIR Systems Program Files folder
SYSQLAUNCHDIR Quick Launch folder
TEMPLATES97DIR Templates folder for Office 97
WINDIR Windows root folder
WORD10DIR Word 2002 folder
WORD9DIR Word 2000 folder
WORD97DIR Word 97 folder
WORD97VIEWERDIR Word 97 Viewer folder
WORD95DIR Word 95 folder
WORD95IADIR Word 95 Internet Assistant folder
WORD95VIEWERDIR Word 95 Viewer folder
advertisement