This is what I have:
On error resume Next
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
'Create a Path to a log file
Const fileName = "c:\vbslog.txt"
Dim WshShell,WshEnv
Dim WshNetwork:Set WshNetwork = CreateObject("WScript.Network")
Set WshShell = WScript.CreateObject("WScript.Shell")
set WshEnv = WshShell.Environment("Process")
Set objFSO = CreateObject("Scripting.FileSystemObject")
SysDrive = WshEnv("SYSTEMDRIVE")
Dim objDomain:Set objDomain = getObject("LDAP://rootDse")
Dim DomainString

omainString = objDomain.Get("dnsHostName")
Dim UserString:UserString = WshNetwork.UserName
Dim objADSysInfo:Set objADSysInfo = CreateObject("ADSystemInfo")
strComputer = WshNetwork.ComputerName
strComputer "."
UserDesktop = WshShell.SpecialFolders("Desktop")
'Your file name
fname = "test.xls"
'Source file location
SFile = SysDrive & "\\dxbserver2\public\" & fname
'Destination Location
Dfile = UserDesktop
'Delete The file
path = UserDesktop & "\" & fname
Set file = objFSO.GetFile(path)
If objFSO.FileExists(path) Then
objFSO.DeleteFile file.Path
End if
'Wait 5 seconds
wscript.sleep 5000
'Log Success and Failure
Set fso = CreateObject("Scripting.FileSystemObject")
If Not FSO.FileExists(Data_Path & filename) Then
Set f = fs

penTextFile(Data_Path & fileName,2, True)
Else
Set f = fs

penTextFile(Data_Path & fileName,8)
End If
If strComputer = "" Then
f.WriteLine VbCrLf & strComputer &" did not respond."
Else
f.WriteLine VbCrLf & strcomputer & " responded."
objfso.CopyFile SFile, DFile, overwrite = TRUE
'On error resume next
End If