Powertoys: Install of 0.20.0 tries to restart Windows Explorer but doesn't complete

Created on 31 Jul 2020  ·  38Comments  ·  Source: microsoft/PowerToys

ℹ Computer information

  • Windows build number: [run "winver"] 19041.388
  • PowerToys version: 0.20.0
  • PowerToy module: Installation

📝 Provide detailed reproduction steps (if any)

  1. Run the update from 0.19.2 to 0.20.0.
  2. At the end, it asks to restart Windows Explorer and I click to let that proceed.
  3. It apparently gets stuck in the restart, with a blank background and current foreground apps showing on top (in this case, Google Chrome and Mozilla Thunderbird, in one tabbed window using TidyTabs).
  4. I Ctrl-Alt-Del and select Sign out.
  5. I sign back in again, and my user account loads normally with Windows Explorer working fine.

✔️ Expected result

_What is the expected result of the above steps?_
The Windows Explorer restart should have completed the restart process without any intervention.

❌ Actual result

_What is the actual result of the above steps?_
The actual result is me having to intervene, signing off and signing on again to complete the restart.

📷 Screenshots

_Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form_
I think my descriptions cover it.

Area-SetuInstall Issue-Bug Resolution-Fix-Committed

Most helpful comment

@crutkas
since we use an official Windows API to restart Explorer and since trying to restart it manually if it doesn't restart in 10 seconds doesn't seem to work, I suggest we replace the option to restart Explorer with a simple notice to log off and log on manually.

All 38 comments

For me, it finished the restart but the system tray was almost empty, although the applications were still running

I just ran the install on another Windows 10 laptop, with the same Windows build number, and the results were exactly the same except I didn't have foreground apps running. Note that the laptops involved are quite different, hardware-wise, the first one being a 2019 Acer Nitro 5 (AMD) and the other a 2009 Dell Inspiron 1545 (Intel).

@enricogior / @yuyoyuppe the watcher may need a bit more tlc from #5293

@crutkas
since we use an official Windows API to restart Explorer and since trying to restart it manually if it doesn't restart in 10 seconds doesn't seem to work, I suggest we replace the option to restart Explorer with a simple notice to log off and log on manually.

@crutkas

since we use an official Windows API to restart Explorer and since trying to restart it manually if it doesn't restart in 10 seconds doesn't seem to work, I suggest we replace the option to restart Explorer with a simple notice to log off and log on manually.

Agreed.

Actually, can we make this built into the installer versus just informing.

@crutkas
you mean we should add the "Windows needs to restart" warning in the MSI and then restart? I suggest not, because I never managed to have that feature working properly.

@enricogior @crutkas
since powertoys is an official microsoft prodoct why are you not contacting the explorer team and figure out with them why the restart api is not working every time?
right now you are only building workarounds.
having to log off after an update is annoying.

@floh96
the two things are not mutually exclusive, we need a solution asap for PowerToys, we can't simply wait for the next release of Windows 10 and even if it will be fixed in a new release it may not be available as a hotfix.

@floh96, issue also is we support all the way back to RS4. If it got fixed, it would be future versions of windows

@enricogior, no. My idea was we have a dialog that throws up "Do you wish for us to sign you out" not force explorer to restart.

I'm 99% vs code does something in their install. I'm also wondering if we can tweak our upgrade process to not destroy the reg entries if they are present.

@crutkas

My idea was we have a dialog that throws up "Do you wish for us to sign you out"

OK!

As told by @enricogior , if we choose not to restart explorer, the app starts just as fine. And everything still works.

@Cyberdroid1
what may not be up-to-date are the shell extensions like PowerRename, but it's also possible that Explorer has already reloaded the extension.

"barış"

Well, if you want to, you can restart explorer on your own through task manager. (I keep task manager always open, so not a hassle for me)

You maybe correct, I don't know about that.

Do we really want the logging off functionality? Even if it's only a dialog that the user needs to agree on, it seems like a very drastic and intrusive measure for the issue we're having, i.e. explorer reloading new shell extensions toys after ~10-30 minutes instead of immediately.

It doesn't affect other modules like Fancy Zones or Power Run, and having some small percentage of users noticing that new bug fixes are not applied for e.g. PowerRename/Svg Preview immediately is a minor issue compared to everyone are being prompted for re-logging. We already have some negative feedback from the users about it.

I suggest we simply show a notification explaining that shell extensions will not be reloaded immediately and reboot/log-off may be needed and do not introduce an action-button for it, since that way the takeaway for most users could be "PowerToys now requires to restart for some obscure reason".

@crutkas @enricogior thoughts?

That would make an assumption that none of the features would work until restarted. So, we can change the prompt stating "PowerToys is now installed. Most features will continue to work, but if you face problem, you will need to logout and login once."

I suggest we simply show a notification explaining that shell extensions will not be reloaded immediately and reboot/log-off may be needed and do not introduce an action-button for it, since that way the takeaway for most users could be "PowerToys now requires to restart for some obscure reason".

I think something like this is the most straightforward fix as restarting Windows Explorer is indeed unnecessary for using most of the PowerToys, and we can't expect a related fix to Windows 10 would be available for all users of PowerToys for the foreseeable future.

This has been a problem for several updates.

@jcddcjjcd We're sadly calling a standard API in Windows. API is basically "hey, we did stuff where you'll need to safely restart" and from there Explorer handles the rest. Before we were manually killing and restarting explorer and the feedback was that wasn't cool which is totally understandable.

@yuyoyuppe i think what you're describing is a good middle ground.

Here is what VS Code does
image

Visually, i didn't see it cycle Explorer however

Even checking context menu, it didn't seem to cycle explorer

@crutkas
VS Code only adds a menu handler, not a full shell extension. PowerRename is loaded in memory by Explorer, not launched as standalone application passing a file list.

I had similar issue during updates:

  • 19.2 -> 20.0
  • 20.0 -> 20.1
    WinVer: 1909 Build 18363.959
  1. PowerToys update was succesful, I confirmed explorer restart
  2. Taskbar disappeared, I could see shortcuts on desktop, but they were flickering all time

@PepekT
thank you for reporting the problem.
Since the Explorer restart is not mandatory, if you have to install PT again (or on a different machine) feel free to choose "No" in the Explorer restart dialog.

@Enricogior, did we see this from 0.19.x release? Feels like 0.20 introduced the issue. Wondering if it is due to EXE vs MSI

@crutkas
we added one file extension, but other than that nothing that might cause Explorer to go bananas. It's more likely something that changed in Windows.

I was able to get out of the crashing loop by using Ctrl+ Shift + Esc to open Task Manager and killing the Windows Explorer task:

image

To add some insights in case it helps, here is the error reported by Explorer as it was stuck in the crash -> launch -> crash -> launch cycle.

Faulting application name: explorer.exe, version: 10.0.19041.388, time stamp: 0x0b2e759c
Faulting module name: KERNELBASE.dll, version: 10.0.19041.388, time stamp: 0x3cc24707
Exception code: 0xc0000602
Fault offset: 0x000000000010b37c
Faulting process id: 0x2d14
Faulting application start time: 0x01d66c199fa85821
Faulting application path: C:\WINDOWS\explorer.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 5ff6ceb4-8b12-4dd7-b8a6-c10155cd2e49
Faulting package full name: 
Faulting package-relative application ID: 

That error happened dozens of time before I was able to get a handle on inputs (mouse and keyboard are hard to use while shell is constantly crashing). Here's a screenshot of approx 1/3rd of them:

image

Issue persists in v0.20.1 installer as well. After confirming to explorer restart, taskbar disappeared and did not come back.
Right clicking on desktop caused below dialog and windows was able to restart after clicking on "Restart the program"

image

@mehul115
0.20.1 didn't make any change to how Explorer is restarted.

@enricogior, did we see this from 0.19.x release? Feels like 0.20 introduced the issue. Wondering if it is due to EXE vs MSI

I experienced this issue when upgrading to 0.19.x as well as 0.20. That being said, I am (for some unknown reason) stuck running Windows 10 1809. (Windows updates always fail when trying to update to 19 and above). Anyway, when I went from PT 18 to PT 19 explorer crashed on me. This has happened since the update to 19 for me. I think removing the option to restart explorer and instead adding the notification that a log off/on may be needed is the best move forward.

For the record, I didn't experience this issue until 0.20.0, although I've only been using PT since 0.18.2. I've been on Windows 10 2004 all along.

Just updated from 0.19.2 to 0.20.1 and the Explorer restart also had issues. Just like @PepekT said: taskbar and other stuff not appearing and desktop icons flickering. However: I used Ctrl+Alt+Del to open Task Manager. There I saw explorer.exe with about 20% of CPU usage. A simple right-click and select "Restart" was enough to snap him out of it.

Build: 10.0.19041.388

@Jay-o-Way
thanks for reporting, but we have already fixed this and 0.21 will not prompt to restart Explorer anymore.

@dtigue
Try doing an in-place upgrade using media creation tool. It might help fixing Windows update. Download tool from here - https://go.microsoft.com/fwlink/?LinkId=691209

Check out this page too - https://docs.microsoft.com/en-us/windows/release-information/status-windows-10-2004

Fix added in 0.21.1, please go to https://github.com/microsoft/PowerToys/releases to upgrade

0.21.1 fixed it for me. I however experienced a seeming double-install, with PT installing twice over, but I'm not sure yet if that was "user error", with me initiating the install twice. I'll monitor this in the next release and open a new issue if necessary.

@stevemagruder
you may have experience this bug https://github.com/microsoft/PowerToys/issues/6329 that happens if you are updating from two version before the current one.

Was this page helpful?
0 / 5 - 0 ratings