Hi,
Code works good, but I need it to overwrite the existing file if it exists. Do I want filesys as opposed to copyfile?
const Hidden = 0
Dim FSO
const WaitOnReturn = true
set objShell = CreateObject("WScript.Shell")
Set objNetwork = WScript.CreateObject("WScript.Network")
Set FSO = CreateObject("Scripting.FileSystemObject")
objNetwork.MapNetworkDrive "B:", "\\cmhwaltps\software"
objShell.CurrentDirectory = "B:\Onbase\"
FSO.CopyFile "B:\Onbase\dmMailServices.dll", "C:\Windows\system32\dmMailServices.dll", true
objShell.CurrentDirectory = "C:\"
objNetwork.RemoveNetworkDrive "B:"
Thanks.
Code works good, but I need it to overwrite the existing file if it exists. Do I want filesys as opposed to copyfile?
const Hidden = 0
Dim FSO
const WaitOnReturn = true
set objShell = CreateObject("WScript.Shell")
Set objNetwork = WScript.CreateObject("WScript.Network")
Set FSO = CreateObject("Scripting.FileSystemObject")
objNetwork.MapNetworkDrive "B:", "\\cmhwaltps\software"
objShell.CurrentDirectory = "B:\Onbase\"
FSO.CopyFile "B:\Onbase\dmMailServices.dll", "C:\Windows\system32\dmMailServices.dll", true
objShell.CurrentDirectory = "C:\"
objNetwork.RemoveNetworkDrive "B:"
Thanks.