1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-27 17:00:59 +01:00
Commit Graph

698 Commits

Author SHA1 Message Date
Amrsatrio
1977d78ba0 Taskbar10: Fix pen menu crashing explorer.exe on 22621.2134+ 2023-09-25 11:06:52 +07:00
Valentin Radu
cdead1b18a libvalinet: Upgraded to latest version which fixes VnGetUBR
Thanks @roflcopter4
2023-09-25 02:29:54 +03:00
Amrsatrio
b426d2c46a File Explorer: Try to avoid crashes related to the new Windows App SDK views 2023-09-25 04:34:02 +07:00
Amrsatrio
6023718b95 Taskbar11: Fixed a bug that crashed explorer.exe when right clicking the new taskbar on Windows 11 builds with "Never combine" on the new taskbar 2023-09-24 19:52:48 +07:00
Amrsatrio
bc3bbc7e5e Taskbar10: Fixed Windows 10 taskbar not showing up on Windows 11 builds with "Never combine" on the new taskbar 2023-09-24 05:10:10 +07:00
Amrsatrio
40d63f1ef8 Version: 22621.2283.57.2 2023-09-23 11:51:43 +07:00
Amrsatrio
dfee1aee37 All: Fixed a bug that crashed explorer on OS builds lower than 22621 (Windows 11 22H2) 2023-09-23 11:46:02 +07:00
KabanFriends
2607f9ab05 Fix typo in ep_extra/README.md 2023-09-23 10:13:29 +07:00
Valentin Radu
a7b29c5409 Version: 22621.2283.57.1 2023-09-23 03:47:14 +03:00
Valentin Radu
fe78dcaa24 Taskbar11: Fixed a bug that crashed explorer.exe when right clicking the taskbar on OS builds 22621.2134 and newer 2023-09-23 03:42:41 +03:00
Amrsatrio
5f2b545748 Symbols: Added patterns for twinui.pcshell.dll as a backup when symbols are not available 2023-09-23 02:23:22 +03:00
Amrsatrio
96e93b7331 Taskbar10: Improved patterns of Moment 2 patches to make them work with 23545.1000 Beta
- Added patterns for twinui.pcshell.dll as a backup when symbols are not available
- Made LoadSymbols clear the returned symbol data when the version is mismatched
- Failure of hooking functions should not prevent Explorer from loading at all anymore
2023-09-22 20:49:17 +07:00
Amrsatrio
1115643206 Taskbar10: Improved patterns of Moment 2 patches to make them work with 22621.2359 Release Preview 2023-09-22 00:13:33 +07:00
Amrsatrio
b76d62e073 Taskbar10: Fixed grammar in Moment2PatchTaskView explanation 2023-09-21 19:13:14 +07:00
Amrsatrio
cd7396e8a0 Taskbar10: Revised the method of patching Task View so that it works on 22621.2134 2023-09-21 18:41:09 +07:00
Amrsatrio
82556f08e6 Taskbar10: Fix new IME context menu on 22H2 2023-09-20 23:09:50 +07:00
Amrsatrio
3be4aabdb5 Taskbar10: Fix Win+A and Win+N on 22621.2134+ 2023-09-20 21:41:53 +07:00
Amrsatrio
e9945d115b Taskbar10: Fix volume and brightness popups on 22621.2134+ 2023-09-20 21:05:25 +07:00
Amrsatrio
765f6ceb9c Taskbar10: Added missing info in patch explanation 2023-09-20 01:33:06 +07:00
Amrsatrio
db1a168ebf Taskbar10: Try to make fixes for 22621.2134.
- Fix Action Center, Control Center, and Toast Center placements.
- Fix Task View refusing to appear.
- Fix Win+B not working.
2023-09-20 01:23:48 +07:00
Valentin Radu
5bda71f184 Version: 22621.1992.56.3 2023-08-23 18:06:23 +03:00
Valentin Radu
2e43c679b9 Taskbar10: Correct centering of taskbar items when search box is enabled in Windows 10 2023-08-23 18:05:01 +03:00
Valentin Radu
cfd53c9f2b Version: 22621.1992.56.2 2023-08-23 03:49:01 -07:00
Valentin Radu
275a91f0d9 Start10: Fixed a bug that prevented centering on Windows 10 2023-08-23 03:47:01 -07:00
Valentin Radu
53ff541d78 Version: 22621.1992.56.1 2023-07-26 16:20:42 +03:00
Valentin Radu
46c504172c Start10: Fixed a bug that prevented the menu from working on OS builds 22621.1413 and newer 2023-07-26 15:57:53 +03:00
Valentin Radu
6fb998eb75 Version: 22621.1555.55.2 2023-04-24 04:15:27 +03:00
Valentin Radu
a95a6881cc Version: 22621.1555.55.1 2023-04-21 23:00:55 -07:00
Valentin Radu
968d969df6 Weather: Fixed widget failing to load when using the Microsoft icon pack
Unfortunately, besides updating the code to work with Google's latest
changes, commit 2a1aad2 introduced a bug when using the Microsoft
icon pack that prevented the widget from loading. Thus, this commit:

* Fixes that (there was no need for `getElementById('wob_tci').children[0]`
apparently)
* Besides checking for blobs in `src`, it also checks for image names,
since `wob_tci` (main icon) still contains a URL, not a blob
* Fixes `wob_tci` to update with proper icon when interacting with the
widget, for example when selecting a day with a different forecast than
the current conditions
* Simplifies some logic, seems the widget works fine without it

Hopefully this fixes the widget properly.
2023-04-21 21:49:01 -07:00
Valentin Radu
0344a5e156 Version: 22621.1413.54.5 2023-03-21 00:00:56 +02:00
Valentin Radu
6bc2ea5d2b All: Fix crash when attempting to hook function on older OS builds
`RtlQueryFeatureConfiguration` is not available on old Windows 10
builds, like 17763 (LTSC 2019).
Related issue: https://github.com/valinet/ExplorerPatcher/discussions/1142
2023-03-20 23:58:32 +02:00
Valentin Radu
8e9403cfb5 Version: 22621.1413.54.4 2023-03-20 20:49:44 +02:00
Valentin Radu
5649a83739 Start11: Fixed a bug that prevented the menu from working when the setting "Disable Recommended section" is used and the display scaling is 125%
Related issue: https://github.com/valinet/ExplorerPatcher/issues/1118
2023-03-20 20:48:34 +02:00
Valentin Radu
4e55feefc3 Version: 22621.1413.54.3 2023-03-19 05:28:43 +02:00
Valentin Radu
27a8fd9a6b Start11: Better enforcement for disabling the "Recommended" section 2023-03-19 05:27:36 +02:00
Valentin Radu
0de81fdc68 Resources: Updated copyright info 2023-03-19 05:27:08 +02:00
Valentin Radu
a5e5287954 Weather: Fixed a bug that prevented the widget from displaying correctly 2023-03-18 22:31:17 +02:00
Valentin Radu
8b5443d59b Version: 22621.1413.54.1 2023-03-18 16:02:40 +02:00
Valentin Radu
2a1aad2d03 Weather: Fixed widget icons when using Microsoft icon pack
This basically undoes commit a8c7fba and properly fixes the issue:
it seems Google moved the images in a separate child `img` tag, under
what I was previously looking for. Furthermore, the src is not a URL
anymore, but directly the image encoded in base64. Fortunately, we
can match the last characters against images obtained from their 48px
and 64px endpoints. More details here:
https://github.com/valinet/ExplorerPatcher/discussions/755#discussioncomment-5353030

It seems Google has introduced a bug, where they do not change the
main image when changing to another day in the widget. Hopefully they
will fix it in the future.
2023-03-18 16:00:39 +02:00
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
Valentin Radu
d7e5b7d3c9 All: Implemented a mechanism to stop repeated crashes
When Windows is updated, it may fundamentally change the layout and
functionality of `explorer`'s internal data structure. Since
ExplorerPatcher intensively patches those in order to deliver its
functionality, it may lead to `explorer` crashing when it performs
these modifications while being unaware (outdated) of the latest OS
changes. The worst scenario is when the crashes happen when `explorer`
starts up (for example, when the user logs in), and could cause the
user to experience an endless loop of `explorer` crashes, and leave
him/her unable to practically use the computer.

In order to mitigate this scenario, when `explorer` starts up as the
shell, ExplorerPatcher increments a counter stored in the registry.
After a predefined timeout (by default, 10 seconds), ExplorerPatcher
will reset the counter to 0. If `explorer` crashes during this period,
the counter will not be reset. When `explorer` restarts, the cycle
repeats. If the counter reaches a predefined value (by default, 3),
instead of starting up again normally (and very probably crashing
again), ExplorerPatcher will display a message window informing the
user about what is happening, offering a few suggestions on how to
proceed next and disable its entire functionality until the next
File Explorer restart, in order to give the user a chance to perform
maintenance on the machine.
2023-03-18 05:23:12 +02:00
Valentin Radu
0ad140c47f Taskbar10: Disable tablet optimized taskbar feature
This fixes Task View and Win-Tab, Alt-Tab breaking after pressing
Win-Tab, flyouts alignment, notification center alignment, Windows key
shortcuts on OS builds 22621.1413+.

Thanks @CthRio for the heads up.
2023-03-18 00:45:13 +02:00
Valentin Radu
23a4190018 All: Infrastructure for reporting which OS features are enabled 2023-03-18 00:43:13 +02:00
Valentin Radu
4f3dab5a5c Version: 22621.1344.53.1 2023-03-01 21:29:35 +02:00
Valentin Radu
f9d702ebbf Taskbar10: Fixed a bug that crashed explorer on OS build 22621.1344
It seems Microsoft updated some stuff in `windowsudk.shellcommon.dll`
and has introduced a new interface (`ITaskbarSettings6`), from which
they call the `GetEffectiveSearchMode` method.

This is not relevant for the Windows 10 taskbar, but the code gets
called there anyway as well, so it had to be patched to support this
new interface.

This fix should address the issue and have ExplorerPatcher still work
on newer 22621-based OS builds, like 1344 ("Moment 2" update).
2023-03-01 21:19:33 +02:00
Valentin Radu
cc0af464c3 Weather: Fixed a bug that displayed the widget area using a different background color
It seems Google changed the widget and explicitly set a background
color, so this patch takes that into account and removes it.
Previously, the widget did not have a background, rather inheriting it
from the `body` element.
2023-03-01 20:41:09 +02:00
Valentin Radu
c083327e2f Weather: Fixed a bug that might throw a script error when certain elements are not ready 2023-03-01 20:39:05 +02:00
Valentin Radu
a8c7fbadaa Weather: Fixed a bug that could prevent the widget from properly loading
It seems that either the web page, either something in Microsoft's
WebView2 implementation changed so that when
`ICoreWebView2::NavigationCompleted` is fired, the elements of interest
on the page are not ready, which causes all this mess, as you can tell.

The solution for now was to delay the execution of my scripts, which
seemed to have gotten rid of the problem for now. I don't particularly
like the solution, I'd of course want something more robust, but I
guess these are the pitfalls when you do not control the entire
ecosystem...
2023-03-01 20:38:35 +02:00
Valentin Radu
ca8ce137d8 ep_extra: Implemented a loadable module for Windows 7's Alt-Tab
As a way to showcase the `ep_extra` loader I wrote in my
previous commit, I have developed this module which enables the use of
Windows 7's Alt-Tab. Mind you, the implementation might not be
complete and 100% ironed out, but rather a functional preview on what
it can look like.

Grab a copy of `AltTab.dll` from Windows 7 (I have tested against
version 6.1.7600.16385) and place it in `C:\Windows`. Then, reload
`explorer` with the `ep_extra` loader and this module in `C:\Windows`
and when you "alt-tab", you should see the Windows 7 window switcher.
This is not a reproduction - it executes the original code from
Microsoft's DLL, only slightly patched to work properly in with the
updated APIs in the newer Windows versions.
2023-03-01 20:35:31 +02:00
Valentin Radu
1f4b586f03 ep_extra: Implemented an ep_extra-based loader
ExplorerPatcher includes a mechanism which allows the user to load
a single DLL, named `ep_extra.dll` and placed in `C:\Windows` when
`explorer.exe` loads. This was long requested by some users who wanted
to perform their own code/initializations/hooks when `explorer` started.

In the mean time, I thought `ep_extra.dll` would work nicely as a
loader for any number of modules. I could've included this functionality
in the main ExplorerPatcher code, but I decided to take it up as a
challenge instead and offer a robust implementation without changing
ExplorerPatcher's main code.

Thus, when using this as `ep_extra.dll`, it will also load DLLs that
match the `ep_extra_*.dll` pattern. These DLLs must export a function
called `setup` which the loader will execute on the thread that is
loading the DLLs. Although not currently checked, return 0 from this
function if your initialization succeeded, or some error code when it
fails.

What's up with the assembly and shell codes and weird threads that I
create? Well, I realized I kind of did a mistake when coding
ExplorerPatcher, in that I should have loaded and executed `ep_extra`
on a seprate thread, not in `explorer`'s main thread. But since I said
I'd do this challenge without changing EP, this was my solution
towards having this `ep_extra` loader do its work, load the other DLLs,
if any, and then unload itself from memory safely and (almost) cleanly
without disturbing the main application right after it does its job.
This way, you can update it seamlessly when `explorer` is running,
which is much more convenient than having to kill `explorer`, replace
the DLL, and then manually reload `explorer`. I don't know if this is
the best way, but it is the way I thought about when realizing that I
cannot call `FreeLibrary` simply, since the "next line" (which would
have been a "return") is well outside of valid memory at that point.
`FreeLibraryAndExitThread` also can't be used since I do not want to
exit `explorer`'s main thread which the loader's function is called on.
2023-03-01 20:27:44 +02:00