@ECHO OFF
IF EXIST %SystemRoot%\system32\tcpsvcs.exe goto TCPOK

ECHO TCP Service not installed.
ECHO .
ECHO You must install TCP/IP before installing the DNS service.
ECHO .

goto LAST

:TCPOK


REM
REM Setup DNS \var\named directory
REM

IF EXIST %SystemRoot%\..\var\named goto Skip1

MKDIR %SystemRoot%\..\var
MKDIR %SystemRoot%\..\var\named

:Skip1

REM
REM Copy configuration files.
REM

ECHO Installing Configuration Files

IF EXIST %SystemRoot%\named.boot goto Skip2

COPY named.boot %SystemRoot%

:Skip2


IF EXIST %SystemRoot%\..\var\named\db.cache goto Skip3

COPY db.cac  %SystemRoot%\..\var\named\db.cache

:Skip3


IF EXIST %SystemRoot%\..\var\named\h2n.dat goto Skip4

COPY h2n.dat %SystemRoot%\..\var\named\h2n.dat

:Skip4


COPY h2n.bat %SystemRoot%\..\var\named\h2n.bat
COPY bog.wri %SystemRoot%\..\var\named\bog.wri
COPY nslookup.help %SystemRoot%\system32


REM 
REM Copy executables 
REM 

ECHO Installing Executables

COPY named.exe     %SystemRoot%\system32
COPY ndc.exe       %SystemRoot%\system32
COPY nslookup.exe  %SystemRoot%\system32
COPY xfer.exe      %SystemRoot%\system32
COPY ndc.cpl       %SystemRoot%\system32


REM
REM Install DNS server as an NT Service.
REM

.\instsrv.exe %SystemRoot%\system32\named.exe

     
ECHO .
ECHO The DNS Service is now installed.
ECHO Please modify the NAMED.BOOT file in %SystemRoot% appropriately.
ECHO .
ECHO You ****MUST**** replace the single slashes in the directory qualifier
ECHO with double slashes.. ie c:\var\named should be c:\\var\\named
ECHO .
ECHO See readme.txt for more information.
ECHO .
ECHO After modifying the database files, use the services control panel
ECHO applet to make DNS autostart and either reboot or manually start it.
ECHO When the system restarts, the DNS service will be running.
ECHO For more information on Bind Operations please see the BOG.Wri
ECHO (Bind Operations Guide) in the System32 directory...
ECHO .

:LAST
