Unquoted Service Paths - Autofix
Description
Encloses the executable part of every unquoted service path in quotation marks and keeps the arguments unchanged. For example, C:\Program Files\Vendor Agent\agent.exe /service becomes "C:\Program Files\Vendor Agent\agent.exe" /service. It runs as the automation of the Unquoted Service Paths - Workstations and Unquoted Service Paths - Servers compound conditions when Unquoted Service Paths - Detection exits with 1, and can also be run on demand. It finds the services with the same rule as the detection script and does not read cPVAL Unquoted Service Path Mode.
The new path is applied through the Windows service control manager, which updates the service configuration and the registry together. Running services keep running and use the new path the next time they start. No service or device is restarted.
After the fix, the automation checks the services again:
| Result | cPVAL Unquoted Service Paths | Activity Result |
|---|---|---|
| No service has an unquoted path | Cleared | Success |
| Some services still have an unquoted path | Lists them with AutofixAttempted set to 1 | Failure, with the names of the services |
The activity log gives the reason for each service that could not be fixed, for example access denied when a security product protects its own service.
The automation verifies its own ProVal signature before it changes anything.
Requirements
- Windows PowerShell 5.1, run as System.
- Access to
contentrepo.net, for the signature check.
Sample Run

Scenarios
- Run by a compound condition: The detection script found unquoted paths on a device type that cPVAL Unquoted Service Path Mode fixes. The automation fixes them and updates cPVAL Unquoted Service Paths.
- Run on demand: Run the automation on a device to fix its unquoted service paths right away, whatever cPVAL Unquoted Service Paths Mode is set to.
Dependencies
- Custom Field - cPVAL Unquoted Service Paths
- Automation - Unquoted Service Paths - Detection
- Solution - Unquoted Service Paths - NinjaOne
Custom Fields
| Field Label | Scope | Accepted Values | Default Value | Description |
|---|---|---|---|---|
| cPVAL Unquoted Service Paths | Device | Written by the automation | - | The services that still have an unquoted path after the fix. Cleared when none is left. |
Automation Setup/Import
Output
- Activity Logs
- Custom field: cPVAL Unquoted Service Paths
Changelog
2026-10-27
- Initial version of the document