Tech Line

Add/Remove Programs Problem

Admin tries to remove programs, but doesn't see that option

Chris: I’ve been trying to remove most of the programs in the Accessories folder on my Windows 2000 Pro desktops, but don’t see the Accessories object listed when I go to Add/Remove Programs and then click on the Add/Remove Windows Components option. Is this a bug?
— Trey

Tech Help—Just An
E-Mail Away

Got a Windows, Exchange or virtualization question or need troubleshooting help? Or maybe you want a better explanation than provided in the manuals? Describe your dilemma in an e-mail to the MCPmag.com editors at mailto:editor@mcpmag.com; the best questions get answered in this column and garner the questioner with a nifty MCPmag.com baseball-style cap.

When you send your questions, please include your full first and last name, location, certifications (if any) with your message. (If you prefer to remain anonymous, specify this in your message, but submit the requested information for verification purposes.)

Trey, first I must tell you that you’re not alone. Several of us at one time have stared at our monitors in bewilderment wondering where some of the installed programs are. When working from home, this is usually the point when my wife feels the need to ask “Are you sure you know what you’re doing?” knowing that there is no easier way to raise my blood pressure about 50 points. (This is the same person who once wanted to know how to disable Norton Antivirus because it wouldn’t let her open an e-mail attachment.)

Anyway, rather than offer any more meaningless rambling, let’s get to your solution. The cause of this problem is due to a little-known file named sysoc.inf, which is located in the %systemroot%\inf folder (c:\winnt\inf by default on Windows 2000 systems). Note that you will need to have the Hidden Files view enabled in order to see this file.

By tweaking the sysoc.inf file, you can control which Windows components are displayed in the Windows Components Wizard. For your particular problem, you will need to remove the string “hide” from the entries that you want to be displayed in the Windows Components Wizard. Here is a sample sysoc.inf file that was copied from a W2K Pro system:

[Version]
Signature = "$Windows NT$"
DriverVer=06/19/2003,5.00.2195.6717

[Components]
NtComponents=ntoc.dll,NtOcSetupProc,,4
Display=desk.cpl,DisplayOcSetupProc,,6
Fax=faxocm.dll,FaxOcmSetupProc,faxsetup.inf,hide,7
NetOC=netoc.dll,NetOcSetupProc,netoc.inf,,7
iis=iis.dll,OcEntry,iis.inf,,7
com=comsetup.dll,OcEntry,comnt5.inf,hide,7
dtc=comsetup.dll,OcEntry,dtcnt5.inf,hide,7
IndexSrv_System = setupqry.dll,IndexSrv,setupqry.inf,,7
msmq=msmqocm.dll,MsmqOcm,msmqocm.inf,,6
ims=imsinsnt.dll,OcEntry,ims.inf,,7
fp_extensions=fp40ext.dll,FrontPage4Extensions,fp40ext.inf,,7
iisdbg=iisdbg.dll,ScrptDbg,iisdbg.inf,,7
imagevue=ockodak.dll,ImagingOcEntry,imagevue.inf,hide,7
AutoUpdate=ocgen.dll,OcEntry,au.inf,hide,7
IEAccess=ocgen.dll,OcEntry,ieaccess.inf,,7
OEAccess=ocgen.dll,OcEntry,oeaccess.inf,,7
WMPOCM=ocgen.dll,OcEntry,wmpocm.inf,,7
Games=ocgen.dll,OcEntry,games.inf,hide,7
AccessUtil=ocgen.dll,OcEntry,accessor.inf,,7
CommApps=ocgen.dll,OcEntry,communic.inf,HIDE,7
media_clips=ocgen.dll,OcEntry,mmopt.inf,HIDE,7
MultiM=ocgen.dll,OcEntry,multimed.inf,HIDE,7
AccessOpt=ocgen.dll,OcEntry,optional.inf,HIDE,7
Pinball=ocgen.dll,OcEntry,pinball.inf,HIDE,7
MSWordPad=ocgen.dll,OcEntry,wordpad.inf,HIDE,7

So if you want to uninstall the games listed in the Accessories folder, you'd edit these lines:

Games=ocgen.dll,OcEntry,games.inf,hide,7
AccessUtil=ocgen.dll,OcEntry,accessor.inf,hide,7

After removing the word “hide,” the lines should then read:

Games=ocgen.dll,OcEntry,games.inf,,7
AccessUtil=ocgen.dll,OcEntry,accessor.inf,,7

At this point, you'd then be able to remove the installed games using the Windows Components Wizard. For more information on editing sysoc.inf, take a look at Microsoft KnowledgeBase Article 223182, "Adding Optional Components to Add/Remove Programs Tool."

Note that another approach to uninstall the unwanted programs would be to use the command line utility sysocmgr.exe. KB 222444, "How to Add or Remove Windows Components with Sysocmgr.exe," provides a pretty good overview of how to use this tool. Here’s a quick example of removing a few popular games using this tool.

Create an unattended.txt file containing a list of all programs to be removed. All that is needed in the file is a section titled [components], followed by the name of each program, an equals sign, and then either “on” or “off.” For example, to uninstall Solitaire, Minesweeper, and Pinball, configure the following unattended.txt file:

[components]
pinball = off
solitaire = off
minesweeper = off

Next, you need to run sysocmgr.exe to remove the programs. The most popular syntax for this tool is:

sysocmgr.exe /i:<sysoc.inf file path> /u:<unattended.txt file name> /q

The /i switch points the command to the location of the sysoc.inf file, while the /u switch identifies the unattended.txt file. The /q switch is optional and can be used to run the command in quiet mode, which suppresses the Windows Components Wizard from being displayed when the program executes. Here’s an example of using this command:

sysocmgr /i:sysoc.inf /u:unattended.txt /q

At this point, any unwanted programs and utilities are now removed. Like most tools, however, sysocmgr.exe does have its limitations. If you want to remove utilities that Microsoft deems as needed by the OS (such as Windows Media Player), you’re out of luck. Now if I could only find a way to uninstall some of my wife’s pre-programmed comments, I’d really be on to something.

About the Author

Chris Wolf is a Microsoft MVP for Windows --Virtual Machine and is a MCSE, MCT, and CCNA. He's a Senior Analyst for Burton Group who specializes in the areas of virtualization solutions, high availability, storage and enterprise management. Chris is the author of Virtualization: From the Desktop to the Enterprise (Apress), Troubleshooting Microsoft Technologies (Addison Wesley), and a contributor to the Windows Server 2003 Deployment Kit (Microsoft Press).learningstore-20/">Troubleshooting Microsoft Technologies (Addison Wesley) and a contributor to the Windows Server 2003 Deployment Kit (Microsoft Press).

comments powered by Disqus
Most   Popular

SharePoint Watch

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.