This is a section of code I have been trying to work on. I need this to check for a paticular reg key. If there is no reg key or if the date stamp on the reg key is greater then the date stamp on the file then I need the script to continue other wise end script.
Option Explicit
'Dim objWMIService, objItem, colItems
Dim strComputer, strMbox, ArrDriveType, WMI, coldisks, disk, strtype, strID, strSys, UsbKey, file, USBFound
Dim objFSO:Set objFSO=CreateObject("Scripting.FileSystemObject")
Dim objFolderA: Set objFolderA=objFSO.GetFolder("\\bluewater\departments$\Information Technology\test\")
'****************** check to see if the files are more current ************************************************
' For Each file in objFolderA.Files
' Check for reg key "HKEY_LOCAL_MACHINE\SOFTWARE\EMERGENCY PLANNING" for date stamp
' if no reg key found on computer then continue with script
' if reg key is more current then file then
' WScript.Quit
Option Explicit
'Dim objWMIService, objItem, colItems
Dim strComputer, strMbox, ArrDriveType, WMI, coldisks, disk, strtype, strID, strSys, UsbKey, file, USBFound
Dim objFSO:Set objFSO=CreateObject("Scripting.FileSystemObject")
Dim objFolderA: Set objFolderA=objFSO.GetFolder("\\bluewater\departments$\Information Technology\test\")
'****************** check to see if the files are more current ************************************************
' For Each file in objFolderA.Files
' Check for reg key "HKEY_LOCAL_MACHINE\SOFTWARE\EMERGENCY PLANNING" for date stamp
' if no reg key found on computer then continue with script
' if reg key is more current then file then
' WScript.Quit