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 PowerShell logic to prevent hanging installer Fix #239521 #242427

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mavaddat
Copy link

@mavaddat mavaddat commented Mar 2, 2025

Here's a pull request description based on the provided changes:


Pull Request Description

Summary

This pull request addresses the issue #239521, where the PowerShell hanging on update is caused by the Remove-AppxPackage failure. The changes ensure that:

  1. PowerShell does not attempt to load the user's profile, which might itself cause the install to hang.
  2. If the Remove-AppxPackage fails, the PowerShell instance gracefully exits.

Details

Changes in code.iss:

  1. Added the following parameters to the PowerShell command: -NonInteractive -NoProfile -NoLogo -Confirm:$false -ErrorAction SilentlyContinue.
  2. Modified the UninstallRun and RemoveAppxPackage procedure to include these parameters.

These changes need to be tested to determine if the single-quoting on the commands is sufficient and well-formed.

mavaddat added 2 commits March 2, 2025 15:38
The PowerShell hanging on update is caused by the `Remove-AppxPackage` failure. These changes ensure that

1. PowerShell does not attempt to load the user's profile (which might itself cause the install to hang)
2. If the Remove-AppxPackage fails, the PowerShell instance gracefully exits
Add `-Confirm:$false -ErrorAction SilentlyContinue` to the `UninstallRun`
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