Force Patch Scan
This page describes how the scan-now.txt marker file is used to trigger a patch scan and how to interpret its contents. The file is evaluated by the patching process to determine whether a new scan is required based on its last modified time.
Behavior
-
A scan is initiated when scan-now.txt exists and its modified time is later than the last recorded scan time on the system.
-
The file does not need any specific contents; the logic relies on the file’s last modified timestamp to decide whether to run a new scan.
For example:
-
File modified date: 10/14/2025 9:42:56 PM.
-
The presence of this file initiates a scan if the file's modified time is later than the last scan time.
Script
# Force Patch Scan
cmd.exe /d /c echo Scan invoked on %DATE% %TIME% from package >> ..\..\Patch\scans\scan-now.txt
-
/d prevents cmd.exe from running AutoRun commands so that only the echo statement executes.
-
The echo line appends a one-line entry with the current date, time, and the text “from package” into ....\Patch\scans\scan-now.txt, creating the file if it does not already exist.
Notes
-
Requires Administrator privileges
-
Best used when:
-
Troubleshooting systems that intermittently miss scheduled scans.
-
-
The scan-now.txt file grows over time, providing a simple history of when the force-scan command ran from different packages or runs.
Log file details
-
Location: ....\Patch\scans\scan-now.txt relative to the script or package working directory.