-
-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect installed windows programs #2582
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nit for your consideration!
src/packagedcode/windows_helpers.py
Outdated
# Remove leading drive letter ("C:\\") and replace all spaces with underscore | ||
install_location_no_root = install_location.relative_to(*install_location.parts[:1]) | ||
install_location_no_root = str(install_location_no_root) | ||
install_location_no_root = install_location_no_root.replace(' ', '_') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this replace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a workaround that I have now removed. Extractcode would replace spaces in file/directory names and the code would not find the file on my system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"purl": "pkg:windows-program/Python%203.9.5%20Tcl/Tk%20Support%20%2864-bit%[email protected]", | ||
"repository_homepage_url": null, | ||
"repository_download_url": null, | ||
"api_data_url": null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the installed files?
Thanks! let me review now... Note that I created https://github.com/mkorman90/regipy/ as an example of a way to get fewer deps with regipy (and explicit support for Python 3.6 and 3.9 who both work fine with it) |
Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
* Create get_msiinfo_bin_location() Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
* Fix function that reports installed .NET versions Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
* Collect installed file locations Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
* Create get_registry_tree that returns a list of dicts that contain the registry entries * report_dotnet_versions and report_installed_programs is now broken up into two parts, first is a call it get_registry_tree and a second is a call to _report_installed_programs or _report_dotnet_versions. These functions prefixed with underscores takes in a list of dictionaries * Update tests by replacing the SOFTWARE registry file with json results Signed-off-by: Jono Yang <[email protected]>
* Remove test MSI installer Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
* Add cli tests for win_pe and mum package detection * Update test results Signed-off-by: Jono Yang <[email protected]>
cab062d
to
259d4a1
Compare
"contains_source_code": null, | ||
"source_packages": [], | ||
"extra_data": { | ||
"install_location": "C:\\Program Files\\Test\\", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider posix-izing the path
* Output installed_files in test result files Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
This PR enhances Windows package detection by introducing new functions that detects installed programs from Windows registry files.
Signed-off-by: Jono Yang [email protected]