JSI Tip 9988. How can I change the default interval that the DHCP client service uses to dynamically re-registry DNS?

DNS records are dynamically re-registered by the DHCP client every 24 hours for workstations, and every hour for servers.

Using REG.EXE, built into Windows XP and Windows Server 2003, or REG.EXE from the Windows 2000 Support Tools on the CD-ROM, Netdom.exe from your operating system's Support Tools on the CD-ROM, and Numeric.bat, I have scripted DRRI.bat to configure the number of seconds that the DHCP client uses for its' periodic DNS record refresh.

The syntax for using DRRI.bat is:

DRRI Type Seconds


Type    is a W for workstations or a S for servers.

Seconds is the number of seconds between DNS registration updates for Type computers.
NOTE: You must restart each computer for the change to become effective.

DRRI.bat contains:

@echo off
if \{%2\}==\{\} goto syntax
set type=%1
Set OK=N
for /f "Tokens=*" %%t in ('@echo %type%^|findstr /i "S W"') do (
 set OK=Y
if "%OK%" EQU "N" goto syntax
set seconds=%2
call numeric %seconds% ans
if "%ans%" EQU "N" goto syntax
if "%seconds:~0,1%" EQU "0" goto syntax
if /i "%type%" EQU "S" set ctrl=DC
for /f "Skip=1 Tokens=*" %%c in ('netdom query /d:%USERDNSDOMAIN% %ctrl%^|findstr /I /V /C:"The command completed successfully."') do (
 @echo REG ADD "\\%%c\HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /V DefaultRegistrationRefreshInterval /T REG_DWORD /F /D %seconds%
 REG ADD "\\%%c\HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /V DefaultRegistrationRefreshInterval /T REG_DWORD /F /D %seconds%
goto :EOF
@echo Syntax: DRRI Type Seconds

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.