Skip to content

Suppress reboot on default #229

Open

Description

@peterjc123

Description of the new feature/enhancement

I tried to do winget install 7zip and then it automatically triggers a reboot on my PC. It's not a good user experience. I think you should suppress the reboot after installation unless explicitly specified.

Proposed technical implementation details (optional)

Either design an option --reboot and make it off by default or just never reboot after installation.

Activity

  1. added
    Issue-FeatureThis is a feature request for the Windows Package Manager client.
    on May 20, 2020
  2. Lebrack commented on May 20, 2020

    @Lebrack

    Are you sure? I intalled 7Zip with no reboot action. Even MSI/EXE classic (manual) installation of 7Zip, don´t triggers a reboot.

  3. peterjc123 commented on May 20, 2020

    @peterjc123
    Author

    Oh, maybe I have an existing 7zip installation. But anyway, we should not trigger reboot automatically.

  4. madcampos commented on May 21, 2020

    @madcampos

    If I reboot after a install will winget be able to return to that point and continue after the reboot?

  5. denelon commented on May 30, 2020

    @denelon
    Collaborator

    peterjc123 the current implementation of the client 0.1 doesn't support a forced reboot. If an installer does, it's outside of the winget.exe client. You may have encountered a bug. I haven't been able to reproduce this in my test VM.

  6. added this to the milestone on Jun 1, 2020
  7. modified the milestones: , on Aug 24, 2020
  8. blogcraft commented on Sep 3, 2020

    @blogcraft

    It happened to me while installing Visual Studio Community and Microsoft Teams.

  9. modified the milestones: , , , on May 3, 2021
  10. WereCatf commented on May 11, 2021

    @WereCatf

    I just installed LibreOffice with Winget and it rebooted Windows, causing me to lose quite a bit of work! That is definitely NOT a good experience.

    Yes, I understand that it's LibreOffice's installer doing that, but this really needs to be fixed one way or another -- the PC should not be rebooting all of a sudden, with zero warning or anything. I don't even care how it gets fixed, maybe Windows needs a way for Winget to be able to inhibit reboots or something, I have no idea, but it's just not reasonable to expect Winget - users to close all of their open work and (attempt to) save their things when installing something, just in case Windows reboots without any prompt at all.

  11. chrisgalvan commented on May 26, 2021

    @chrisgalvan

    I had this issue while installing Visual Studio in my new computer. It did reboot in the middle of installation.
    I use a script to setup all my dev tools/apps and everything was good and dandy until it rebooted, there was not way to resume or know what programs installed or not.

    Not sure if scripting is the way to go here or if even is a supported scenario but would be great to handle the reboots so I can finish intalling then rebooting.

  12. 49 remaining items

  13. xhoy commented on Feb 26, 2024

    @xhoy

    Hi, is there been any progress in the last 10 months on this issue? We would love to silently deploy software, but this may not trigger any reboots....

  14. nascentt commented on Mar 2, 2024

    @nascentt

    Demitrius Nelon (@denelon) Have you guys reached out to Chocolately or AptGet (R.I.P.)? I've never experienced reboots with them.

    The way Chocolatey does it is by spamming shutdown -a constantly whilst doing actions.

  15. nascentt commented on Mar 2, 2024

    @nascentt

    Hi, is there been any progress in the last 10 months on this issue? We would love to silently deploy software, but this may not trigger any reboots....

    We've been holding off deploying this for years now because of this issue. We're not about to switch over to an app management system that sometimes reboots machines.
    How this hasn't been a critical priority issue I'll never know.

  16. nascentt commented on Oct 28, 2024

    @nascentt

    Is Winget abandonware?
    No activity on this in half a year. No resolution in 4 1/2 years.
    Winget is unusable in this state.

  17. Masamune3210 commented on Oct 28, 2024

    @Masamune3210

    Amazingly enough, this is not, in fact, the only issue that exists for the entire project, and figuring out why the installers are misbehaving and how to work around it isn't exactly simple.

    And no, spamming 'shutdown -a' will not work. All that does is abort any existing shutdown timer. It doesn't do anything if a timer isn't used or if something uses one of the dozen other ways that exist to cause a reboot.

  18. nascentt commented on Oct 28, 2024

    @nascentt

    I was just stating what chocolatey does in response to denlon.

    I'm sure there's many issues remaining in Winget, sadly this is the main one blocking it from being usable in any way.

  19. Masamune3210 commented on Oct 29, 2024

    @Masamune3210

    ........many people use it all the time. I use it practically every day, to the point that I don't even bother going to sites to download things anymore, I just grab it through Uniget, which is just a GUI frontend for winget

  20. nascentt commented on Oct 29, 2024

    @nascentt

    ........many people use it all the time. I use it practically every day, to the point that I don't even bother going to sites to download things anymore, I just grab it through Uniget, which is just a GUI frontend for winget

    Sure it's a great random reboot generator that also installs software. I use it at home too. Not really suitable for an enterprise environment though.

  21. Blacklands commented on Oct 29, 2024

    @Blacklands

    Does Winget have any real interest of dealing with this issue, as far as its whole design philosophy goes? It would appear to me that things like this issue are basically out of scope for it.

    All it really does (for the most part) is download and run installers (or copy files and add a path to PATH for portable software), doesn't it? Which is not meant to downplay the work that goes into Winget - I just mean that Winget's design philosophy doesn't seem to be to actually control the actual software installation process. I know it calls itself a "Package Manager", but it's really more a "software fetcher", isn't it? It doesn't host any actual packages (just install manifests), it doesn't actually "package" anything, it doesn't maintain its own list of the software it has installed (it just reads from the Windows Registry, and if software doesn't write to that correctly then Winget is helpless - see for the example the still-ongoing issues with managing Discord through Winget). There's also the ongoing issue of dealing with unwanted shortcuts that software creates because it doesn't offer the right install flags to control that... and other issues of that kind. It seems to me that the Winget development team basically just treats all of these as "not our responsibility". Winget is not actually a Package Manager in the way that e.g. Chocolatey or the various Linux Package Managers are.

    So I think even something like spamming shutdown -a is out of the scope for Winget. It doesn't want to care about what software installers are doing, it just wants to download and run them and throw its hands in the air about what happens beyond that. I'm not that happy with the state of things myself, when I started using Winget I was under the impression that this is an actual package manager - but I personally no longer believe that now. shrug

  22. slonopotamus commented on Oct 29, 2024

    @slonopotamus

    Well, I do not fully agree.

    I wrote an absolutely canonical MSI package that scheduled a reboot via standard MSI mechanisms. But the way winget was invoking MSI installation converted a scheduled reboot into an immediate reboot. Note that both MSI and winget technologies come from Microsoft, so I believe it is winget responsibility to make them work together is an adequate way (and this has happened, though it took several years: #2499).

    Current issue also mentions VCRedist triggering reboots. Who is responsible for fixing this? Microsoft-as-VCRedist-owner or Microsoft-as-winget-owner? In either case, it is Microsoft.

  23. removed this from the milestone on Nov 14, 2024
  24. denelon commented on Jul 26, 2026

    @denelon
    Collaborator

    Issue summary

    • Requests that WinGet suppress installer-initiated reboots by default, with an opt-in flag to allow reboots when desired.

    Current state — the framework is implemented:

    • WinGet does not initiate a reboot by default; use --allow-reboot to opt in.
    • Reboot-required installer exit codes are recognized via the manifest ExpectedReturnCodes and handled gracefully: "reboot required to finish" is reported as a success with a warning (no automatic reboot), and a resume-after-reboot flow is available when reboots are allowed.
    • The MSI case where a scheduled reboot was converted into an immediate reboot has been fixed (see the related PR below).

    Remaining gap (why this stays open):

    • Some installers still reboot even when suppression is requested — most often .exe installers that don't honor a no-restart switch, an MSI that invokes a nested executable without passing the flag through, or updating a running dependency (e.g. VCRedist) that forces a reboot to complete.
    • These are per-package issues rooted in installer behavior and manifest metadata (correct silent/no-restart switches and ExpectedReturnCodes), rather than something WinGet can universally force at the client level.

    Re-scoping:

    • Keeping this open to track the long tail of packages that reboot despite suppression. Specific offenders are best addressed as per-package manifest fixes (Catalog-Health) so the correct no-restart switches and return codes are captured.
    • If you hit a package that reboots unexpectedly, please share the exact package identifier and version so it can be triaged against its manifest.

    Related

    Drafted with the help of GitHub Copilot.

  25. Kissaki commented on Jul 27, 2026

    @Kissaki
    Contributor

    or updating a running dependency (e.g. VCRedist) that forces a reboot to complete.

    I assume this refers to when the product installer triggers them, not when winget installs them as a dependency to the product installer?

    Does winget handle the reboot stuff for dependencies it installs the same way as the product installers?

  26. eldair commented on Aug 17, 2026

    @eldair

    EA App (ElectronicArts.EADesktop) also reboots without consent on update v13.768.7.6285-15019056 and it also removes the app. There was a similar issue I previously reported and was fixed but is probably related (microsoft/winget-pkgs#352972)

    Here is event from event viewer:

    Image
  27. eldair commented on Sep 7, 2026

    @eldair

    No updates on this? IT is a disaster, how can it be allowed for an app updated via cli tool without UI to execute reboot without any warning or consent?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Catalog-HealthSome scenarios related to install/upgrade/import need improvementsIssue-FeatureThis is a feature request for the Windows Package Manager client.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions