1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-23 23:21:08 +01:00
ExplorerPatcher/ep_setup
Valentin Radu 1738b45866 Setup: explorer will restart using the token it was running under before starting application maintenance
The patch has been adapted to employ the old behavior when setup is
elevated using the same credentials, while using the updated code with
`CreateProcessWithTokenW` when otherwise.

Original description (via email):

"I have two accounts on my Windows machine: A normal one that is a
standard user (not admin) which I use as my main account where I have
ExplorerPatcher installed and configured, and an Admin account which is
 a Windows administrator account.

During installation and update the installer restarts itself and
requests admin privileges. For this I have to provide the password to
the Admin account. The installer then runs as that Admin user, stops
the explorer process, installs ExplorerPatcher and then tries to start
the explorer again. But the explorer never starts, which leaves me with
 an empty screen and a session without an explorer. I can then start a
Taskmanager via Ctrl + Shift + Esc and manually start the explorer, but
 this is annoying and maybe even frightening for a nontechnical user.

The reason why the explorer is not started again is that it is started
as the wrong user. It is started as the Admin user, which isn't logged
in so the explorer quits immediately.

The fix is to remember the user that the explorer was running under and
then start the new explorer for that user. I have tested these changes
in a Windows 11 virtual machine, by installing and uninstalling for a
standard user, as well as installing and uninstalling for an
administrator user."

Original patch: https://github.com/Abestanis/ExplorerPatcher/tree/fix_explorer_restart
Credit @Abestanis
2023-03-18 05:28:13 +02:00
..
ep_setup_debug.rc Start: Functional Windows 10 Start menu 2022-02-25 00:19:25 +02:00
ep_setup.c Setup: explorer will restart using the token it was running under before starting application maintenance 2023-03-18 05:28:13 +02:00
ep_setup.rc Start: Functional Windows 10 Start menu 2022-02-25 00:19:25 +02:00
ep_setup.vcxproj Implemented weather taskbar widget 2022-01-27 04:35:27 +02:00
ep_setup.vcxproj.filters Implemented weather taskbar widget 2022-01-27 04:35:27 +02:00
resource.h Start: Functional Windows 10 Start menu 2022-02-25 00:19:25 +02:00