13.1 Installing the DNS Server
The
Microsoft
DNS Server is an optional Windows networking component that can be
installed from the command line with the
sysocmgr utility, which is installed with the
operating system. It can be found in
%SystemRoot%\system32.
To use sysocmgr, you first need
to create an answer file. An answer file specifies one or more
optional components that you want to install. In our case, we will
just install the DNS server. Here is what our answer file looks like:
[netoptionalcomponents]
dns=1
When running sysocmgr, we need to
specify two options. The first is /i, followed by
a colon and the path to the
sysoc.inf file, which is stored in the
%SystemRoot%\inf directory by
default. The second option is /u, followed by a
colon and the path to the answer file. If the answer file is stored
in the root of the C: drive and is called
dns_install.txt, the full command
line would look like this:
C:\> sysocmgr /i:%SystemRoot%\inf\sysoc.inf /u:c:\dns_install.txt
This starts installation of the service. You will see screens pop up
as if you were installing the service through the GUI. You are
prompted for the location of the Windows Server 2003 CD files, unless
the sysoc.inf file points to a
local drive or network share that contains the
\i386 directory that can be found on the CD.
Additional options available with
sysocmgr can install the DNS server silently.
If you want to suppress all screens during installation, you can use
the /x and /q options. See
Figure 13-1 for the complete list of options that
are supported.
Figure 13-1. syscomgr command-line options

You can also use sysocmgr to
uninstall the DNS server. To do that, change the contents of the
dns_install.txt answer file to
the following:
[netoptionalcomponents]
dns=0
Run sysocmgr with the same
command-line options shown previously.
For more information about unattended installation options and the
syntax of answer files, check out the
ref.chm help file that can be extracted from
the \support\tools\deploy.cab
file on the Windows Server 2003 CD.