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

update exe uninstall to be more reliable #121

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

sbrito85
Copy link
Collaborator

@sbrito85 sbrito85 commented Sep 4, 2024

Pull display name to compare with package name, remove whitespace from display name.

Fix logic to search uninstall string if silent string does not exist.

continue
}
// Remove display name whitespace to conform to package name
if strings.ToLower(strings.ReplaceAll(displayName, " ", "")) == strings.ToLower(installSource) {
// Check if the value exists, move on if it doesn't
un, _, err := q.GetStringValue("QuietUninstallString")
if err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be if err != nil || un == "" ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There's an assumption that if we hit an error hear(likely not exists), that un will be "". I have yet to see a case where silentinstallstring exists but has no value.

@nguyen-phillip nguyen-phillip merged commit 55543de into google:master Sep 4, 2024
3 checks passed
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.

2 participants