Estou tentando copiar um papel de parede de um servidor para todos os computadores cliente. A unidade do sistema em PCs não são sempre C. Este é o script que eu estou tentando usar:
Const OverwriteExisting = TRUE
Dim WshShell, objFSO, SystemDrive
Set WshShell = WScript.CreateObject("WScript.Shell")
Conjunto objFSO = CreateObject("Scripting.FileSystemObject")
Definir objLocalFile = objFSO.GetFile % SystemDrive % & "\Windows\Web\Wallpaper"
dtmLocalDate = objLocalFile.DateLastModified
Definir objServerFile = objFSO.GetFile ("\\23o.local\23ofs\Free Install\Custom\2co-desktop-bg.bmp")
dtmServerDate = objServerFile.DateLastModified
Set WshShell = CreateObject("WScript.Shell")
SystemDrive = WshShell.ExpandEnvironmentStrings("%Systemdrive%")
Se dtmLocalDate< dtmserverdate="" then="">
objFSO.CopyFile objServerFile.Path, objLocalFile.Path, OverwriteExisting
End If