winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Detection Method

Open dkattan opened this issue 5 years ago • 4 comments

Description - Add a detection method property similar to SCCM.

Software packagers do all kinds of dumb things that require custom detection.

  • Not placing a key in the registry at all
  • Including versions in the DisplayName
  • Not including versions in the DisplayVersion
  • Having a DisplayName with special characters that mess with regex (Notepad++)
  • Self-updating by overwriting files in Program Files, but not updating the registry with the new DisplayVersion

Proposed technical implementation details

Detection Script

Include an optional "DetectionScript" field in your package manifest that accepts a PowerShell script that returns a valid semantic version if it is installed, and Null or Empty string if it is not. The script can look at file versions and other places indicative of the actual installed version of the software.

Add regex and version capture support to the name field

For software that places its version in DisplayName and not DisplayVersion, allow a regex pattern to capture the version. I've seen a lot of LOB apps do this. For a DisplayName of "My Ancient LoB Soft Pro 18.7.123" the regex pattern could be "My Ancient LoB Soft Pro (\d+.\d+.\d+)"

dkattan avatar May 21 '20 03:05 dkattan

Maybe detection scripts could be shared with those from RuckZuck?

sschuberth avatar May 21 '20 08:05 sschuberth

@denelon - Is this resolved with the ARP entry matching?

Trenly avatar Jul 09 '22 03:07 Trenly

@Trenly not all the use cases above are resolved. Some of them are most likely unactionable at this time. We've been discussing some additional options, and these types of challenges are also what led to:

  • #2252

denelon avatar Jul 09 '22 16:07 denelon

@Trenly not all the use cases above are resolved. Some of them are most likely unactionable at this time. We've been discussing some additional options, and these types of challenges are also what led to:

Ah, makes sense; Thank you

Trenly avatar Jul 09 '22 16:07 Trenly