Recipe 4.1. Uninstalling


Recipe 4.1. Uninstalling "Unremovable" Components

Problem

You have standard utilities on your PC, such as WordPad or Windows Messenger, that you want to uninstall because you never use them and you want to free up disk space. You can't remove them using the Control Panel's normal Add or Remove Programs applet because the utilities don't show up in the applet.

Solution

Using a graphical user interface

To remove built-in utilities and components, you normally choose Control Panel Add or Remove Programs Add/Remove Windows Components to get to the W indows Component Wizard, shown in Figure 4-1. To remove a component, click the checkbox, click Next, and follow the wizard's instructions for removing the component.

Figure 4-1. The Windows Component Wizard only lets you remove certain applications and utilities


But a number of Windows utilities and components, such as Windows Messenger and WordPad, don't show in the Windows Component Wizard, so there's no apparent way to uninstall them.

But you can, in fact, remove these components. To do it, you'll have to make the components show up in the Windows Component Wizard. Then you can remove them as you can any other file.

To force them to show up in the Windows Component Wizard, you edit the Setup Information file that controls what appears in the Windows Component Wizard:

  1. Use Notepad or another text editor to open the Setup Information file, sysoc.inf, which is generally found in the C:\WINDOWS\INF folder. For safety's sake, make a backup of the file before editing it, so you can revert to it if you need to. And you should also set up a System Restore point before making the changes as well. To set up a System Restore point, see Recipe 19.5.

    C:\WINDOWS\INF is a hidden folder, so if you want to view its contents, you will first have to enable hidden folders by going into Windows Explorer and choosing Tools Folder Options View and choosing Show Hidden Files and Folders.


  2. When you open the file, look for the line describing the program that you want to uninstall. Lines in the file have the format:

    program=program.dll,OcEntry,program.inf,,numeral

    Programs that are uninstallable all have the word hide or HIDE embedded in the string. When the word is included in the string, the program won't show up in the Windows Component Wizard. So the Pinball game entry, which doesn't show up in the wizard, looks like this:

    Pinball=ocgen.dll,OcEntry,pinball.inf,HIDE,7

  3. To force the component to show up in the Windows Component Wizard, remove the word hide from the entry that refers to the component you want to remove. For example, if you wanted to remove Pinball, you'd edit its entry to this:

    Pinball=ocgen.dll,OcEntry,pinball.inf,,7

  4. Save the sysoc.inf file, then run the Windows Component Wizard. The component will now show up in the Windows Component Wizard. Remove it as you would any other component.

    Keep in mind that not all of the entries in sysoc.inf are as easy to understand as Pinball and WordPad. For example, if you want to remove Windows Messenger, look for the entry that starts with the text msmsgs, and if you want to remove the Accessibility Wizard, look for the entry for AccessOpt. Table 4-1 lists the "uninstallable" programs and what their entries are in the sysoc.inf file.

Table 4-1. "Uninstallable" programs and their sysoc.inf entries

Entry

What entry refers to

AccessOpt

Accessibility Wizard

MultiM

Multimedia components, including Media Player, Volume Control, and Sound Recorder

CommApps

Communications components, including Chat, Hyperterminal, and Phone Dialer

AutoUpdate

Windows Automatic Update

TerminalServer

Terminal Server

Dtc

Distributed Transaction Coordinator

Dom

COM+

WBEM

Windows Management Instrumentation

Pinball

Pinball game

MSWordPad

WordPad

Msmsgs

Windows Messenger


Discussion

You can use this same technique in reverse to hide components you don't want to be accidentally uninstalled. Simply put the word HIDE in the proper place in the entry that you don't want to show up in the Windows Component Wizard. That way, the entry can't be accidentally deleted. For example, if you wanted to hide the uninstall entry for the fax utility, you'd edit its entry by changing:

Fax=fxsocm.dll,FaxOcmSetupProc,fxsocm.inf,,7

to:

 Fax=fxsocm.dll,FaxOcmSetupProc,fxsocm.inf,HIDE,7

Also, you may run into a few problems when trying to remove "uninstallable" components. On some systems, you won't be able to remove Windows Messenger Windows Messenger won't show up on the Windows Component Wizard even after you edit the sysoc.inf file. And some components, such as Terminal Server, will show up in the wizard if you edit the sysoc.inf file, but the wizard still won't let you uninstall them.

See Also

Recipe 4.2 for information about how to remove applications that leave bits of themselves behind even after uninstallation



Windows XP Cookbook
Windows XP Cookbook (Cookbooks)
ISBN: 0596007256
EAN: 2147483647
Year: 2006
Pages: 408

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net