If you're supporting both Windows XP Professional and Windows 2000 Professional, you may have noticed that the Windows Components Wizard, shown in Figure A, in Windows XP Professional's Add or Remove Programs tool allows you to remove the Accessories And Utilities optional components from the operating system while the same wizard, shown in Figure B, in Windows 2000 Professional's Add/Remove Programs tool doesn't. This means that, in Windows XP Professional, you can remove such optional components as desktop wallpaper, Paint, and even all the games, but you can't remove any of those components from Windows 2000 Professional. As you can imagine, being able to removing these components from Windows XP Professional can save disk space as well as eliminate potential time wasting activities.
If you'd like the same sort of control over Windows 2000 Professional, there is a way to make these optional components appear in the Windows Components Wizard by editing a special data file. Once you do so, you can easily remove any or all of the optional components from the operating system.
|Windows XP Professional’s Windows Components Wizard allows you to individually remove the Accessories And Utilities optional components.|
|The Accessories And Utilities optional components don’t appear in Windows 2000 Professional’s Windows Components Wizard.|
Understanding the Sysoc.inf data file
When you launch the Windows Components Wizard from within the Add/Remove Programs tool, the wizard references a data file called Sysoc.inf that is stored in the C:\Windows\Inf folder. (If you upgraded to Windows 2000 Professional over Windows NT, the folder path will be C:\Winnt\Inf folder.) The operating system uses the information found in this file to fill out the Components list displayed in the Components Wizard.
While most of the entries in this data file are marked as active, those that pertain to the Accessories And Utilities optional components are marked as hidden. As such, in order to make the optional components appear in the Windows Components Wizard, you have to remove the hidden marker.
More specifically, the lines marked as hidden have the following format:
ComponentName is the name that refers to the component, and Program.inf is the name of the file containing detailed information on how the program is to be installed and uninstalled in the Windows 2000 Professional operating system. To mark the entry as active, all you have to do is remove the word HIDE from the line as shown here:
Be sure to leave the comma as a placeholder.
Making a backup copy
Before you edit the Sysoc.inf file, you should make a backup copy. That way, if you make a mistake while editing or later wish to return to the default configuration, you can do so simply by deleting your edited version and renaming the backup copy.
To begin, launch Windows Explorer and access the C:\Windows\Inf folder. Once you locate the Sysoc.inf file, you can quickly create a backup copy by right-clicking on the file and dragging it slightly to the right. Then, drop it and select the Copy Here command from the shortcut menu.
Editing the Sysoc.inf file
Editing the Sysoc.inf file is easy and can be done with Notepad. To do so, simply right-click on the file again and select the Open command. When the file opens, scroll down to the section titled old base components under the [Components] heading, as shown in Figure C.
|When you open the Sysoc.inf file, locate the section titled old base components.|
As you edit the Sysoc.inf file, keep in mind that you must, at the very least, remove the HIDE code from the line that reads AccessUtil=ocgen.dll,OcEntry,accessor.inf,HIDE,7
in order for the Accessories And Utilities item to appear in the Components list. If you remove the HIDE code from the other lines but leave this line hidden, you won’t be able to remove any of the optional components.
As you can see, each line in the old base components section contains the HIDE code, which instructs the Windows Components Wizard not to display that particular item in the Components list. As I mentioned earlier, all you have to do is remove the HIDE code in order to make the components associated with that particular line’s INF file visible. You’ll find a detailed description of each component associated with each INF file in Listing A.
Once you edit the file, save it. You can then return to the Add or Remove Programs tool and use the Windows Components Wizard to remove any of the optional components from Windows 2000 Professional, as shown in Figure D.
|Once you edit the Sysoc.inf file, you can easily remove optional components from Windows 2000 Professional.|
Note: You can’t remove Media Player
While you can add the Media Player to the Windows Components Wizard, and even clear the associated check box, you can’t remove it from the operating system. Windows 2000 Professional considers Media Player a core component of the operating system and won’t remove it.
Other components you can remove
In addition to the optional components that show up under the Accessories And Utilities branch, there are several others that you can add to the Components list in the Windows Components dialog box. Once you do this, you can then remove these components from the Windows 2000 Professional operating system if you wish. These other optional components are:
- · COM+: Provides support for developing and deploying distributed component-base applications
- · Distributed transaction coordinator: Coordinates distributed transactions between multiple clients, servers, and resource managers
- · Fax service: Allows the sending and receiving of faxes
- · Imaging: These include Image Viewer, ActiveX Custom Controls, and Twain Support
Automating the removal of the optional components
If you decide that you want to remove some or all of these optional components from a large number of Windows 2000 Professional systems, you probably don’t want to have to go from system to system and manually edit the Sysoc.inf file and then run the Add or Remove Programs tool | Windows Components Wizard to remove optional components. Fortunately, you can automate the procedure by using the command line tool Sysocmgr.exe and an answer file.
The answer file simply consists of the [Components] heading along with the component code name, which is followed by an equals sign and either the word on or off depending on whether you want to add or remove the component respectively. Keep in mind that you can’t remove WordPad or Media Player using Sysocmgr.exe and an answer file.
Figure E shows an answer file that will remove all of the optional components. The answer file is simply a standard text file that can have any filename you wish. For your convenience, Listing B contains the same text shown in Figure E. Copy and paste this text into a text file, name the file Removal.txt and save it to the C:\Windows\Inf folder.
|To use the Sysocmgr.exe command line tool, you need to use an answer file.|
To use the Sysocmgr.exe command line tool you’ll need to use two of the tool’s command line switches:
/i:path to Sysoc.inf file
/u:path to answer file
For example, if the answer file is named Removal.txt and saved in the C:\Windows\Inf folder, you would open a Command Prompt window, change to the C:\Windows\Inf folder and use the command:
Sysocmgr /i:Sysoc.inf /u:Removal.txt
When you press [Enter] to run this command line, you’ll momentarily see the Windows Components Wizard as it performs the operation. When the operation is complete, the Windows Components Wizard automatically exits.