Skip to content
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

add windows installer-info from registry to flares #1957

Merged
merged 3 commits into from
Nov 15, 2024

Conversation

zackattack01
Copy link
Contributor

We do not write out an installer-info.json file for windows - instead we write the relevant metadata to the registry during MSI installation.

This updates the package install checkup to collect that information (along with our newly added CurrentVersionNum and InstalledVersionNum keys) and write out an installer-info.json file with those values for our flares.

func getDefaultRegistryStringValue(path string) string {
key, err := registry.OpenKey(registry.LOCAL_MACHINE, path, registry.QUERY_VALUE)
if err != nil {
return ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to use naIfError here so we can capture the additional info in the errors too, in case they're useful? Same goes for below and in getDefaultRegistryIntValue too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah that makes sense to me! will do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i ended up just directly returning the errors as strings to avoid dealing with the any response everywhere, I think this should achieve the same. let me know what you think!

RebeccaMahany
RebeccaMahany previously approved these changes Nov 15, 2024
@zackattack01 zackattack01 added this pull request to the merge queue Nov 15, 2024
Merged via the queue into main with commit ff59366 Nov 15, 2024
31 checks passed
@zackattack01 zackattack01 deleted the zack/add_windows_installer_info_to_flares branch November 15, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants