Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon Script

Status
Not open for further replies.

mrnez

Technical User
Sep 11, 2002
37
GB
Hello Any ideas on the following, as it appears not to work, It doesn't throw up any errors


Const PDCexist = "\\pdc\netlogon\check"

if not fso.FileExists(C_hosts) Then
if fso.FileExists(PDCExist) Then fso.CopyFile"\\pdc\netlogon\hosts", "c:\winnt\system32\drivers\etc\"
Else fso.CopyFile"\\bdc\netlogon\hosts", "c:\winnt\system32\drivers\etc\"
Set TextStreamObject = fso_OpenTextFile(C_hosts,2,true,0)
TextStreamObject.WriteLine("The Hostfile on this machine was updated at " & NOW) &VBReturn
TextStreamObject.Close
End If

Thanks

Rich
 
please ignore the above, it's been a long day :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top