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 = fs
penTextFile(C_hosts,2,true,0)
TextStreamObject.WriteLine("The Hostfile on this machine was updated at " & NOW) &VBReturn
TextStreamObject.Close
End If
Thanks
Rich
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 = fs
TextStreamObject.WriteLine("The Hostfile on this machine was updated at " & NOW) &VBReturn
TextStreamObject.Close
End If
Thanks
Rich