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

Side effects of UndockingDisabled #4

Closed
Gaurav-Original-ClassicShellTester opened this issue Aug 23, 2021 · 11 comments
Closed

Side effects of UndockingDisabled #4

Gaurav-Original-ClassicShellTester opened this issue Aug 23, 2021 · 11 comments
Labels

Comments

@Gaurav-Original-ClassicShellTester

On this page here: http://www.classicshell.net/forum/viewtopic.php?t=8580 I am trying to keep a list of side effects of UndockingDisabled. Maybe they can be helpful to you and helpful to me (in case I missed any side effects).

@valinet
Copy link
Owner

valinet commented Aug 23, 2021

Thanks, that’s the reason I avoid using UndockingDisabled and instead prefer to patch Explorer to get the features I want back.

@Gaurav-Original-ClassicShellTester
Copy link
Author

Gaurav-Original-ClassicShellTester commented Aug 23, 2021

If you can maintain this over the long term once Windows 11 is released, for stable releases at least, for as long as Microsoft keeps the old code intact, that would be pretty awesome! 7+ Taskbar Tweaker's developer for example has keeping his essential fixes alive for a really long time - since Windows 7. It will be a great service to the power user community.

@Gaurav-Original-ClassicShellTester
Copy link
Author

Gaurav-Original-ClassicShellTester commented Aug 24, 2021

OK I got 22000.1 and got it running. Simply fantastic!

@valinet
Copy link
Owner

valinet commented Aug 24, 2021

So, from the 22000.51 ISO uninstall kb5004564 and it will go back to 22000.1 in which the classic Windows 10 Start works, also the network flyout works and the notification center is unchanged as well. With my patcher, you also restore the missing Win+X menu, classic taskbar without UndockingDisabled and the ability for Start to open on the monitor containing the cursor when invoked with the Windows key.

@valinet
Copy link
Owner

valinet commented Aug 24, 2021

OK I got 22000.1 and got it running. Simply fantastic!

Perfect, I am glad you made it work, thank you! Should’ve kept the original comment as well, did not bother me in any way :)

@valinet
Copy link
Owner

valinet commented Aug 29, 2021

@Gaurav-Original-ClassicShellTester I found a way to fix the delay at logon when enabling the old taskbar (which happens in UndockingDisabled as well). It comes down to injecting a library in Explorer and checking whether the Start button has shown on a loop (if it is shown, then it means the taskbar pretty much loaded), and then firing up the event that notifies the logon framework thread that the taskbar has loaded and that it is now okay to dismiss that login screen, which is basically there just to hide the 'loading' visuals of Explorer. In pseudocode, it comes down to something like this:

while (TRUE)
{
    HWND hWnd = FindWindowEx(
        NULL,
        NULL,
        L"Shell_TrayWnd",
        NULL
    );
    if (hWnd)
    {
        hWnd = FindWindowEx(
            hWnd,
            NULL,
            L"Start",
            NULL
        );
        if (hWnd)
        {
            if (IsWindowVisible(hWnd))
            {
                break;
            }
        }
    }
    Sleep(1);
}
HANDLE hEvent = CreateEvent(0, 1, 1, L"ShellDesktopSwitchEvent");
if (hEvent)
{
    SetEvent(hEvent);
}

Of course, the real reason for this happening is that the original code that sets the event in Explorer is not called for some reason, yet I did not take the time to look on this in more depth.

I have already included this fix in ExplorerPatcher 22000.168.0.6, which btw works on the latest build as well.

BR

@Gaurav-Original-ClassicShellTester
Copy link
Author

Gaurav-Original-ClassicShellTester commented Aug 30, 2021

Hey thanks to your updated patcher, I just upgraded to the current 22000.168 and it worked perfectly. However I noticed two things:

  1. Installing StartIsBack++ (for taskbar skinning and other fixes like icon size) makes the logon slow again and the startup sound doesn't play, the Windows 11 menu remains unavailable. Disabling StartIsBack++ (without uninstalling it) returns to full functionality of ExplorerPatcher.

  2. When Explorer.exe crashes for any reason, the new Taskbar loads. This is not related to StartIsBack and occurs even with it disabled. Similarly if I do "Restart" on Windows Explorer from Task Manager Processes tab, it loads the new taskbar. However if I do Exit Explorer or terminate all Explorer.exe processes manually and then do New Task -> Explorer.exe, it loads the classic Taskbar.

@valinet
Copy link
Owner

valinet commented Aug 30, 2021

Hi

  1. Regarding 1, yeah, I haven't took the time to test it with StartIsBack++... idk, that gets hooked way earlier into Explorer, maybe it does something that prevents the event from being set and thus the delay is there again. As I said, the delay is because Explorer does not reach the method that it usually reached when it was done initializing all the stuff, for some reason, so the logon screen just gives up waiting after some time and displays whatever is on screen. In that configuration, Start does not work because it also waits somehow for that event to get signaled until it initializes properly. Really weird, more investigation may be required here, as I said, it would be nice to figure out why the new Explorer does not finish the initialization all the way. Similarly, the startup sound should be played right before the event is signaled, but, again, since Explorer never reaches that code, it does not play, so I had to restore it manually in my library.
  2. This is also expected behavior, the Taskman is apparently executed only when clean starting Explorer... idk, maybe I should find a better way to hook Explorer, the way OpenShell does, for example, which I have briefly looked onto and found pretty complicated. In the mean time, as a workaround, if you want to restart Explorer, just kill sihost.exe and that will reload the shell correctly with ExplorerPatcher working.

I am glad the app works, hopefully struct offsets do not change between versions, as those would be a pain in the ass to determine and would pretty much mean hardcoding them for multiple versions, I believe. Fortunately, it worked between 22000.1 and 22000.168 just fine. Otherwise, function addresses are determined dynamically now, which is great as it allows patching to work automatically on new OS builds; also, the offset that has to be patched in CTray::Init is determined automatically by repeatedly patching instructions and seeing if Explorer manages to survive and whether the old taskbar is displayed, and then saving the correct offset for future use.

Thank you for using the app and especially for the feedback, hopefully I can add more features soon. Have a look on ArchiveMenu, a workaround for the limited context menu in Explorer for quickly performing actions on archive files.

@Gaurav-Original-ClassicShellTester

Yeah I mean it is definitely much improved from the version you had for 22000.1. Really really appreciate it! Without this, I would go insane with rage with that awful Taskbar. And no amount of fixes and feedback are going to bring back the huge huge number of features people lost from the classic one which had accrued over 25 years, since Windows 95!

I will ask StartIsBack++'s developer too if he can solve the incompatibility with ExplorerPatcher. But your tool is gonna be absolutely required now going forward so what you have created is super-useful and I am sure in time more people who are intelligent enough to see just how much of a step backwards the new taskbar is, will discover your app.

@valinet
Copy link
Owner

valinet commented Aug 31, 2021

Just a quick update: I have addressed point 2 above, now the app is a single DLL which you drop in C:\Windows and it gets loaded by Explorer automatically and is injected in each instance. Restarting from Task Manager or killing and manually starting Explorer work just fine now. It's like the code is in Explorer from the get go, almost :D

Also, I have also replied to your email.

Thanks

@Gaurav-Original-ClassicShellTester
Copy link
Author

Gaurav-Original-ClassicShellTester commented Aug 31, 2021

This is the bestest version yet. Even the first issue mentioned above is resolved as well as the second one. Now EVERYTHING works smoothly. No issues with slow logon or other Start menu incompatibilities. Also regardless of how Explorer is restarted, always the classic Taskbar loads. I couldn't be happier!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants