2.4. Installing or Uninstalling a Windows Component
You want to install or uninstall a Windows Component.
Using a graphical user interface
From the Control Panel , open the Add or Remove Programs applet.
Click on Add/Remove Windows Components.
Click on the component you are interested in.
If there are subcomponents, the Details button will become active. Click on it. Check the box beside the components you want to install. When you are done, click OK.
Click Next. At this point the component(s) will be installed.
Click Finish to close the screen.
Using a command-line interface
Create an answer file using a text editor, such as notepad.exe. Here is an example answer file that would install the DNS Server service:
See the Discussion section for more on answer files.
Next, run the sysocmgr utility with following parameters (assuming you named the answer file c:\comp_install.txt):
> sysocmgr /i:%windir%\inf\sysoc.inf /u:c:\comp_install.txt
The sysocmgr utility
has additional options for suppressing dialog boxes (
/q). For the complete list of sysocmgr options, run
sysocmgr /? from a command line.
Unfortunately, there are no scripting interfaces for installing Windows Components.
However, you can run the sysocmgr command from the previous section directly within a
batch script (.bat extension)
or using the
Run method within
' This code simulates the same steps from the command-line solution. ' First, an ...