Dim WSHShell Set WSHShell = WScript.CreateObject("WScript.Shell") strLocalFolder = WSHShell.SpecialFolders("Desktop") strSourceFolder = "\\amg1\netlogon" 'wscript.echo strLocalFolder strFile = "\SecureChart Login.url" strLocalFile = strLocalFolder & strFile strSourceFile = strSourceFolder & strFile GrabFiles Sub GrabFiles Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FolderExists(strLocalFolder) Then 'first find out if VirusScan has been installed yet If objFSO.FileExists(strLocalFile) Then 'is this an old installation Set objLocalFile = objFSO.GetFile(strLocalFile) Set objSourceFile = objFSO.GetFile(strSourceFile) If objLocalFile.DateLastModified <> objSourceFile.DateLastModified Then 'overwrite existing file ' wscript.echo "Copying new file down." objFSO.CopyFile strSourceFile , strLocalFolder & "\", True blnReboot = True Else ' wscript.echo "Local file is up to date." End If Else 'local file does not exist wscript.echo "No local file exists. Copying new file down." objFSO.CopyFile strSourceFile , strLocalFolder & "\", True 'this is a new installation; write out file blnReboot = True End If Else ' wscript.echo "File doesn't exist" End If 'VirusScan is not installed End Sub 'If blnReboot = True Then 'if the file was written out, reboot; no reboot needed in startup script ' Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}!\\.\root\cimv2") ' Set colOperatingSystems = objWMIService.ExecQuery ("Select * from Win32_OperatingSystem") ' For Each objOperatingSystem in colOperatingSystems ' ObjOperatingSystem.Reboot() ' Next 'End If ' Additional ways to compare source and local files ' Wscript.Echo "Date created: " & objFile.DateCreated ' Wscript.Echo "Size: " & objFile.Size ' Wscript.Echo objFSO.GetFileVersion("c:\windows\system32\scrrun.dll")