Article ID: 259395
Article Last Modified on 3/3/2007
APPLIES TO
- Microsoft Windows 2000 Server
- Microsoft Windows 2000 Advanced Server
This article was previously published under Q259395
SUMMARY
During the promotion process (Dcpromo.exe) on a domain controller, the %DSDIT%, %DSLOG%, and %SYSVOL% environment variables are set. These variables exist only during the promotion process; they are referenced in the Basicdc.inf security template. These variables may also prove to be useful for administrators. This article describes how to write a script that sets these environment variables during startup.
MORE INFORMATION
To set these environment variables on your domain controllers, copy the following text to a file named Dcenvvars.vbs:
Set WshShell = CreateObject("WScript.Shell") strDSLog = WshShell.RegRead("HKLM\System\CurrentControlSet\Services\NTDS\Parameters\Database log files path") strDSDit = WshShell.RegRead("HKLM\System\CurrentControlSet\Services\NTDS\Parameters\DSA Working Directory") strSysvol = WshShell.RegRead("HKLM\System\CurrentControlSet\Services\Netlogon\Parameters\Sysvol") strSysvol = Left(strSysvol, Len(strSysvol)-7) Set WshEnv = WshShell.Environment("SYSTEM") WshEnv("DSLOG") = strDSLog WshEnv("DSDIT") = strDSDit WshEnv("SYSVOL") = strSysvol
Then, in the Default Domain Controllers policy, specify the Dcenvvars.vbs script under the following section:
Computer Configuration\Windows Settings\Scripts (Startup/Shutdown)\Startup
For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:
250454 Error Returned Importing the BASICDC Security Template in Security Configuration Editor
256000 Error Messages After Importing Basicdc.inf into Group Policy
Keywords: kbdcpromo kbenv kbhowto KB259395