Deploy a one-time cleanup EXE on Windows without Success CriteriaSolved

Participant
Discussion
2 months ago Oct 21, 2026

I need to run a one-time Windows cleanup executable after devices enroll in Hexnode. The file is an EXE cleanup tool and does not install like a normal application.

When I try to add it as a Windows Enterprise App, Hexnode asks for Success Criteria such as an App Identifier, Registry Path, or Install Path. This tool does not seem to create any of those because it only runs once and removes an existing agent.

Is there a way to deploy and execute this EXE on Windows devices without adding Success Criteria?

Replies (1)

Marked SolutionPending Review
Hexnode Expert
1 month ago Oct 21, 2026
Marked SolutionPending Review

Hello @it_christo ,

Yes. For this type of one-time executable, deploying it as a Windows Enterprise App is not the best option because Enterprise App deployment requires Success Criteria to verify whether the app was installed successfully.

Success Criteria can be an App Identifier, Registry Path, or Install Path. If the EXE does not create a persistent registry entry, installed application record, or file path, Hexnode UEM cannot reliably confirm the installation status. In that case, the deployment may be marked as failed even if the executable ran.

Use a Script policy instead:

  1. Host the EXE on a server or cloud storage location that the target Windows devices can access.
  2. Go to Policies > [Create a new policy] > Windows > Configurations > Scripts.
  3. Add a PowerShell or batch script that downloads the EXE to the device and runs it.
  4. Associate the policy with the Windows devices that should run the cleanup tool.

For example, a PowerShell script can follow this structure:

$sourceUrl = “https://<server>/AgentCleanupToolClient.exe”
$localPath = “$env:TEMP\AgentCleanupToolClient.exe”

Invoke-WebRequest -Uri $sourceUrl -OutFile $localPath
Start-Process -FilePath $localPath -ArgumentList “<silent-arguments-if-any>” -Wait

If the executable does not require silent arguments, remove the “-ArgumentList” portion or replace it with the correct arguments recommended by the vendor.

This approach runs the EXE directly on the Windows device and does not require Enterprise App Success Criteria.

Regards,
Simon Scott
Hexnode UEM

Save