Reference Domain Controller in Script

P

peter stickney

I administer a windows 2000 pro domain with 2 windows 2000 domain
controllers. I am working with this script ( http://support.microsoft.com/kb/914387
). In it they have you apply a registry fix to the registry and build
a vb script. They also have instructions how to make a login script
to apply it to workstations. I already have a login script, so I just
need to add these 2 lines in it:

----------------8<-----------------
regedit /s \\contoso.com\NETLOGON\TZupdate.reg
script \\contoso.com\NETLOGON\refreshTZinfo.vbs
---------------->8-----------------

Where contoso.com is the domain used in the KB article. My issue is
this. Since I have 2 domain controllers, and this script is
replicated across both of them, how do I reference the domain
controller in these lines? I dont want to hard code 1 server name in
there or the other, in case that one is down. So is there something I
can put in there to have it chose which ever server is currently being
used to login with?

Hope that makes sense.

TIA

-peter
 
H

Herb Martin

peter stickney said:
I administer a windows 2000 pro domain with 2 windows 2000 domain
controllers. I am working with this script (
http://support.microsoft.com/kb/914387
). In it they have you apply a registry fix to the registry and build
a vb script. They also have instructions how to make a login script
to apply it to workstations. I already have a login script, so I just
need to add these 2 lines in it:

----------------8<-----------------
regedit /s \\contoso.com\NETLOGON\TZupdate.reg
script \\contoso.com\NETLOGON\refreshTZinfo.vbs
---------------->8-----------------

Where contoso.com is the domain used in the KB article. My issue is
this. Since I have 2 domain controllers, and this script is
replicated across both of them, how do I reference the domain
controller in these lines? I dont want to hard code 1 server name in
there or the other, in case that one is down. So is there something I
can put in there to have it chose which ever server is currently being
used to login with?

Try %LogonServer% but the script has to run after this environment
variable has been setup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top