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

Not working with Win11 23H2 when UAC is off #98

Open
circcc opened this issue Sep 26, 2023 · 47 comments
Open

Not working with Win11 23H2 when UAC is off #98

circcc opened this issue Sep 26, 2023 · 47 comments

Comments

@circcc
Copy link

circcc commented Sep 26, 2023

This program was useful when I turned off UAC in Windows 11 22H2, but it no longer works in 23H2.
I updated windows 11 22H2 to September 26, 2023—KB5030310 (OS Build 22621.2361) Preview Cumulative Update(https://support.microsoft.com/en-us/topic/september-26-2023-kb5030310-os-build-22621-2361-preview-363ac1ae-6ea8-41b3-b3cc-22a2a5682faf), then no longer works when UAC is off.

@LiquidatorFX
Copy link

When Windows11DragAndDropToTaskbarFix is ​​running in this build of Windows, I cannot get the dragged file to the desired icon, there is a shift of 5-6 icons to the right relative to the place where I drag

@HerMajestyDrMona
Copy link
Owner

Did you disable the Known Pixels detection, as described here?

https://github.com/HerMajestyDrMona/Windows11DragAndDropToTaskbarFix#limitations

Have you tried to increase timings in the configuration file?

UAC problem was reported/discussed before. It might be some Windows limitation that when UAC is off - all programs are running as administrator and have no permissions for each other. Therefore drag and drop can't make operations in other windows, because they're also some kind of "sandboxed".

@HerMajestyDrMona
Copy link
Owner

And why on the Earth do people still need to use this program? The drag and drop should be working natively on Windows 11.

@LiquidatorFX
Copy link

And why on the Earth do people still need to use this program? The drag and drop should be working natively on Windows 11.

It doesn't work, I recorded a video in the next thread

@circcc
Copy link
Author

circcc commented Sep 27, 2023

And why on the Earth do people still need to use this program? The drag and drop should be working natively on Windows 11.

It's not working when UAC is off. I needed this program when UAC is off, and it worked well until 22h2, but it doesn't work in 23h2.

@HerMajestyDrMona
Copy link
Owner

So when UAC is on, the native drag and drop starts working as intended (without this program)?

@LiquidatorFX
Copy link

LiquidatorFX commented Sep 27, 2023

So when UAC is on, the native drag and drop starts working as intended (without this program)?

In short the situation is like this:

  1. I just created a new account and in the newly created account the built-in drag and drop works

  2. I went back to my main account - the built-in administrator account - and unfortunately the built-in drag and drop does not work on it, either with UAC enabled or disabled.

    Thus, I discovered that on the built-in administrator account (which is my main account), it is not possible to enable the built-in drag-and-drop function, so your software remains as relevant as ever! Therefore, if possible, please check your built-in administrator account - does the built-in drag and drop work for you?
    We are waiting for an update from you, since Microsoft seems to have not completely closed the issue and will have to use your utility all the time ;)

@circcc
Copy link
Author

circcc commented Sep 27, 2023

So when UAC is on, the native drag and drop starts working as intended (without this program)?

Yes.
However, because UAC is inconvenient for me, I turn off UAC. So, this proram was useful.

@HerMajestyDrMona
Copy link
Owner

HerMajestyDrMona commented Sep 28, 2023

I disabled UAC by the Control Panel (set to Never Notify), but in regedit, key:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\
EnableLUA

is still:

1

After I changed it to:

0

And restarted the computer, the native drag and drop stopped working.

@HerMajestyDrMona
Copy link
Owner

The problem in W11DADTTF after the recent windows updates, it's that it doesn't detect the correct number of icons on the taskbar. In debug window I see:

Found Taskbar Window: 000000000002017C
Taskbar Window Width: 528. Taskbar Window Rect: 55:583:1080:1032
Number of icons on taskbar: 12

But I have at least 17 icons visible on the taskbar (starting counting from the weather one).

RECT rect;
if (hWndMSTaskSwWClass) {
				GetWindowRect(hWndMSTaskSwWClass, &rect);
}
else {
				rect.left = 0;
				rect.right = 0;
				rect.bottom = 0;
				rect.top = 0;
}

TaskbarWindowWidth = rect.right - rect.left;
if (PrintDebugInfo) {
				std::wcout << L"Taskbar Window Width: " << TaskbarWindowWidth << L". Taskbar Window Rect: " << rect.left << ":" << rect.right << L":" << rect.bottom << L":" << rect.top << "\n";
}

NumberOfItemsOnTaskbar = TaskbarWindowWidth / DefaultTaskbarIconWidth;
if (PrintDebugInfo) {
				std::wcout << L"Number of icons on taskbar: " << NumberOfItemsOnTaskbar << "\n";
}

hWndMSTaskSwWClass is FindWindowEx(PrimaryScreen.hWndRebar, 0, L"MSTaskSwWClass", nullptr);

But this window is much smaller now when checking with Spy++

So basically, window MSTaskSwWClass that was supposed to be the width of all icons on the taskbar is now smaller, and the icons are outside of it, on a window with class Windows.UI.Composition.DesktopWindowContentBridge

Without that core information, the Windows11DragAndDropToTaskbarFix is unable to guess which icon on the taskbar the mouse pointer is currently on. This entire program is about guessing things, it doesn't know the real positions.

I think Microsoft released a buggy update where this MSTaskSwWClass window doesn't resize correctly. Or maybe they intended to use it for something else.

But come on, they can't even fix their native drag and drop to work without UAC...

@HerMajestyDrMona
Copy link
Owner

HerMajestyDrMona commented Sep 28, 2023

Can you guys please download this version?

https://mega.nz/file/xUlk0RYY#O-TDTXy7EIkI1bdKWvi5ocJR5AwWjYHlgzMAJaE-ggw

Then edit file: Windows11DragAndDropToTaskbarFixConfig.txt, and add:

FixNumberOfIconsOnTaskbarAddOffset=7

Might need to change the Offset, but 7 is what fixed it for me.

I added some quick dirty workaround:

NumberOfItemsOnTaskbar = TaskbarWindowWidth / DefaultTaskbarIconWidth;
if (FixNumberOfIconsOnTaskbarAddOffset != 0) {
      NumberOfItemsOnTaskbar = NumberOfItemsOnTaskbar + FixNumberOfIconsOnTaskbarAddOffset;
      TaskbarWindowWidth = TaskbarWindowWidth + (FixNumberOfIconsOnTaskbarAddOffset * DefaultTaskbarIconWidth);
      if (PrintDebugInfo) {
	 std::wcout << L"Config variable \"FixNumberOfIconsOnTaskbarAddOffset\" was set to: " << FixNumberOfIconsOnTaskbarAddOffset << ". Adjusting the NumberOfItemsOnTaskbar by this number.\n";
    }
}
...

and...

if (((WindowUnderMouse == hWndMSTaskSwWClass) || ((FixNumberOfIconsOnTaskbarAddOffset != 0) && (WindowUnderMouse == hWndTray))) || WindowUnderMouse == hWndTrayNotify) {
...

So generally adding (or decreasing if negative number), number of icons that the program detected, and also faking the TaskbarWindowWidth value. But it seems to work, so what else is needed :D

@LiquidatorFX
Copy link

But come on, they can't even fix their native drag and drop to work without UAC...

Therefore, your utility still remains extremely relevant and requires updating and support, because these crooked fools from Microsoft managed to break basic things with which there have never been problems.

In the new edition of Win 11, I noticed a difference in the notification icon in the far right corner. Previously it was a callout - a rectangle, and now it is a bell.....

Maybe because they changed the appearance of the icons in the right corner - everyone else is now branded differently?

@HerMajestyDrMona
Copy link
Owner

HerMajestyDrMona commented Sep 28, 2023

@LiquidatorFX I posted a comment one minute before you: #98 (comment)

If you get a chance, please download it, add the configuration line and test if it works.

After few days of testing, I might release an official update of this old program, lol.

@LiquidatorFX
Copy link

LiquidatorFX commented Sep 28, 2023

@LiquidatorFX I posted a comment one minute before you: #98 (comment)

If you get a chance, please download it, add the configuration line and test if it works.

After few days of testing, I might release an official update of this old program, lol.

Yes, this update definitely works better than before! Now hitting the icon that is being drawn is almost perfect!
However, I installed
FixNumberOfIconsOnTaskbarAddOffset=9

It seems to me that this way I get the icon I need directly (the one with the adobe audition)! but the leftmost ones are still shifted a little by 1-2 icons, but this is still much better than half the panel as it was before ;)

@HerMajestyDrMona
Copy link
Owner

HerMajestyDrMona commented Sep 28, 2023

Well, if we need to use different numbers, and side icons are still incorrectly clicked then it's not a good solution :(

What is the number that works best for you for the left-most icon? I thought this should be the one to base on...
When you set the first minimum number that works with left-most icon, then other icons are not working correctly?

@LiquidatorFX
Copy link

LiquidatorFX commented Sep 28, 2023

In fact it turns out like this

If I set it to 8 and only the salamander file manager is running on the taskbar on the right - the hit is perfect

Next, I open 2 working applications, Audition and Pegasus, and then the offset in the program must be adjusted again - by 1-2 icons, i.e. up to 9 or 10, so that it hits them perfectly

1080.mp4

so I see that there is also a small dependence on the number of actually open applications in which we copy... hmm, as soon as I open two working applications 8 it no longer works and needs to be adjusted by 1-2 icons..... but it’s all the same better than before

@HerMajestyDrMona
Copy link
Owner

HerMajestyDrMona commented Sep 28, 2023

So maybe we need to make some algorithm that automatically sets the offset, based on the current "originally" detected icons?

Please download this version (it has more debug information): https://mega.nz/file/gB8k2ZoD#PoF4HLdBOa4K9LiNV4bh8aTlzzsNlqnPUuCjsrJuB5I

Can you enable the console and the debug output and see what it shows?
https://github.com/HerMajestyDrMona/Windows11DragAndDropToTaskbarFix/blob/main/CONFIGURATION.md#should-the-program-show-the-console-window-when-it-starts

ShowConsoleWindowOnStartup=1
PrintDebugInfo=1

I'm interested in texts:

Number of icons on taskbar: X

and:

NEW Number of icons on taskbar:  X

It would be useful to have a list of when it's working correctly, for example a table with 3 columns:

  • Number of icons
  • Offset (the lowest number that works with the right-most icon)
  • NEW Number of icons

Maybe this can be done with some math :D

@LiquidatorFX
Copy link

1+2.mp4
3.mp4

1.txt
2.txt
3.txt

@LiquidatorFX
Copy link

That is, I catch myself in the region of 8-9 and with the main applications running, in which I use drag (audience or pegasus), I can, in principle, with a small error, hit exactly the right window, but if the applications are closed, then the hit can shift by 1-2 icon... something like this

In principle, the previous version of the fix also worked and I was already able to work quite comfortably with drag and drop

@LiquidatorFX
Copy link

LiquidatorFX commented Sep 28, 2023

I also noticed that the two Wiindows buttons on the far left next to the start of the “search” and “task view” shortcut are not highlighted = they do not participate in the process when you try to point something at them

@HerMajestyDrMona
Copy link
Owner

HerMajestyDrMona commented Sep 28, 2023

I'm stupid. I wrote to test the far-left icon while I meant far-left one.

You don't need to restart the program after changing the settings. When you make changes in the config file (CTRL+S) it should restart itself automatically. There was probably additional config variable that removed the message box confirmation about it :)

The buttons near the start menu are not supposed to work, because they're not being triggered by these hotkeys that this program is stimulating. So it's expected behaviour.

Before Windows update, was this program correctly determining the icon 100% of the time?

I hoped that adding extra offset would be the correct way, but maybe it doesn't resize by additional icon size, just some pixels, like half of the default icon size... Not so good.

They definitely complicated it, and I wonder if it's a bug on Microsoft's end, or maybe they damaged it intentionally. I'm out of ideas how to detect the current length of icons area in automated way :( Only some math with praying that it behaves the same on all DPI scaling settings can save us

One more thing: why can't you change that ...LUAC registry key, and then disable UAC notifications normalny? Wouldn't it behave exactly the same with the native drag and drop fixed?

@circcc
Copy link
Author

circcc commented Sep 28, 2023

Thank you, HerMajestyDrMona.
New version works with "FixNumberOfIconsOnTaskbarAddOffset=7"

However, sometimes if there is a Windows settings icon or Edge icon in the taskbar, it not work properly.
Also, if I set windows settings new option “Combine taskbar buttons and hide labels” to "Never", it not work properly. But I don't mind because I use "Always" as in the previous version.

However, it was inconvenient because this program did not work for a few days after updating Windows. Although it is not perfect yet, thank you for fixing it.

@LiquidatorFX
Copy link

Before Windows update, was this program correctly determining the icon 100% of the time?

Yes it worked great

One more thing: why can't you change that ...LUAC registry key, and then disable UAC notifications normalny? Wouldn't it behave exactly the same with the native drag and drop fixed?

As I wrote earlier, it doesn’t work for me under the built-in administrator account with both UAC enabled and disabled. The built-in one works only on a newly created washing account, but for many years I have been using only the built-in “Administrator”, because it has the least restrictions on working with system files and does not pop up any children’s windows to confirm further actions, which greatly irritate me;) After all, after they came up with the big UAC, it became tiresome for me to use other accounts due to many restrictions for lamers.

In any case, thank you for the fix, with its help it works fine, I selected an offset equal to 8 or 9 for myself and now I get right where I need it when dragging

@HerMajestyDrMona
Copy link
Owner

As I wrote earlier, it doesn’t work for me under the built-in administrator account with both UAC enabled and disabled. The built-in one works only on a newly created washing account, but for many years I have been using only the built-in “Administrator”, because it has the least restrictions on working with system files and does not pop up any children’s windows to confirm further actions, which greatly irritate me;) After all, after they came up with the big UAC, it became tiresome for me to use other accounts due to many restrictions for lamers.

I understand, but this key:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA

Did not change for me to "0" when I disabled the UAC notifications by the Control Panel. After that the native drag and drop still worked for me.

I wonder if your EnableLUA always remains as 0, even when you re-enable UAC in the Control Panel? Maybe that's the problem? Maybe this key should be set to 1, but UAC disabled only by the Control Panel?

By the built-in administrator account, you mean some hidden account on Windows, not the first-created Administrator account? That probably changes many things, as I never even tried to use it. In fact, I quite approve the UAC idea for security reasons. So probably on this built-in account you can't ever enable the UAC fully to get D&D working.

Thinking about it now, I think the reason of why the native drag and drop is not working with UAC disabled, is due to permissions:

  • The taskbar window, and all Windows things are created with administrator permissions.
  • The process responsible for controlling user's mouse input is still running with lower permissions.

Maybe one of the solutions would be researching which service runs with lower permissions on the administrator accounts, and then restarting this service with higher permissions? But obviously it can bring security risks.

From what I remember, this Windows11DragAndDropToTaskbarFix also has problems dragging items to other programs which are running as administrator (in UAC enabled mode), so most likely the new Microsoft's native drag and drop implementation is... mhm... unprofessional for an Operating System?

I'll try to make some research and see if I can find the correct algorithm of how incorrectly the MSTaskSwWClass size is set after windows update. If it's the same sizing problem on all screen resolutions, DPI scaling settings, then maybe I can come up with some calculations.

Actually, it might not even be as hard as I'm worrying. I can basically see how much the MSTaskSwWClass window width increases when a new icon is added, and simply multiply treat this size as DefaultTaskbarIconWidth.

@LiquidatorFX
Copy link

  1. Yes, I’m talking specifically about the initially hidden, disabled built-in administrator account - it has the broadest rights and permissions. After installing Windows, I enable it separately through the security policies and re-login from it.
  2. Yes, I have always had EnableLUA=1 and the built-in drag and drop does not work

@HerMajestyDrMona
Copy link
Owner

Sorry guys, I think it will be impossible to fix, unless Microsoft fixes it with their update.

I programmed a brand new function to detect for the Taskbar window changes, when an app icon is being created:

int Return_Current_Taskbar_Window_Width() {
	if (PrimaryScreen.hWndMSTaskSwWClass) {
		RECT rect;
		GetWindowRect(PrimaryScreen.hWndMSTaskSwWClass, &rect);
		int Difference = rect.right - rect.left;
		return Difference;
	}
	return 6969;
}

void Auto_Detect_And_Fix_Incorrect_MSTaskSwWClass_WindowSize() {
	if (AutoDetectAndFixIncorrectMSTaskSwWClassWindowSize) {
		std::wcout << L"AutoDetectAndFixIncorrectMSTaskSwWClassWindowSize is ENABLED. Trying to auto-detect the offset..." << endl;
		if (ShowConsoleWindowOnStartup) {
			ShowWindow(GetConsoleWindow(), SW_HIDE);
		}
		Sleep(HowLongSleepWhenAutoDetectingMSTaskSwWClassWindowMilliseconds);
		Update_Primary_Screen_Windows_HWNDSs();
		bool DetectedCorrectly = false;
		int InitialWidth = Return_Current_Taskbar_Window_Width();
		if (InitialWidth != 6969) {
			ShowWindow(GetConsoleWindow(), SW_SHOW);
			Sleep(HowLongSleepWhenAutoDetectingMSTaskSwWClassWindowMilliseconds);
			Update_Primary_Screen_Windows_HWNDSs();
			int SecondWidth = Return_Current_Taskbar_Window_Width();
			if (SecondWidth != 6969) {
				int InitialSecondDifference = SecondWidth - InitialWidth;
				std::wcout << L"AutoDetectAndFixIncorrectMSTaskSwWClassWindowSize: InitialWidth: " << InitialWidth << L". SecondWidth: " << SecondWidth << L". Difference: " << InitialSecondDifference << L"." << endl;

				if (InitialSecondDifference >= 0) {
					ShowWindow(GetConsoleWindow(), SW_HIDE);
					Sleep(HowLongSleepWhenAutoDetectingMSTaskSwWClassWindowMilliseconds);
					Update_Primary_Screen_Windows_HWNDSs();
					int ThirdWidth = Return_Current_Taskbar_Window_Width();
					if (ThirdWidth != 6969) {
						int ThirdWidthDiff = ThirdWidth - SecondWidth;
						int ThirdAbsoluteDiff = abs(ThirdWidthDiff);
						std::wcout << L"AutoDetectAndFixIncorrectMSTaskSwWClassWindowSize: ThirdWidth: " << ThirdWidth << L". ThirdWidth and SecondWidth ABS difference: " << ThirdAbsoluteDiff << L"." << endl;
						if (ThirdAbsoluteDiff == InitialSecondDifference) {
							//FOUND New Offset!
							DetectedCorrectly = true;
							AutoDetectedSingleIconWidthChangeOffsetSucceed = true;
							AutoDetectedSingleIconWidthChangeOffsetOnMSTaskSwWClassWindow = ThirdAbsoluteDiff;
							std::wcout << L"AutoDetectAndFixIncorrectMSTaskSwWClassWindowSize: Sussessfully detected the single icon offset: " << ThirdAbsoluteDiff << L"." << endl;
						}
					}
				}
			}
		}

		if (!DetectedCorrectly) {
			std::wcout << L"AutoDetectAndFixIncorrectMSTaskSwWClassWindowSize: Auto-detecting offset failed!" << endl;
		}

		if (ShowConsoleWindowOnStartup) {
			ShowWindow(GetConsoleWindow(), SW_SHOW);
		}
	}
}

But it wasn't working in my tests. So I checked it with Spy++, and it's illogical:

Video:

https://mega.nz/file/hZEUGaAQ#aVOM2ElUu0p5oSyxB6U-1OUqy0LukheYNQWiavmC3RI

This MSTaskSwWClass window size changes randomly, sometimes every 2, sometimes every 3, sometimes every 1 icon.

I can't detect how many apps are there on the taskbar, because the only window that helped identifying it has now incorrect sizes reported. So the only solution is waiting for Microsoft to fix it (hahahahahahaha), or get the native drag and drop working :(

One more solution could be adding an offset option to the program tray icon context menu... So users could switch it while the program is running, but I hate non-automated methods. It would be annoying to worry about such a simple thing :/

@circcc
Copy link
Author

circcc commented Sep 29, 2023

Sorry guys, I think it will be impossible to fix, unless Microsoft fixes it with their update.

I understand. Thank you for your efforts so far. I think you can close this thread.

@LiquidatorFX
Copy link

Thank you very much for your efforts, with the fix for specifying manual offset it already works and does not cause any discomfort

@HerMajestyDrMona
Copy link
Owner

I'll leave the thread open, to remember about it. Maybe one day I get some workaround idea.

Yesterday even Bing AI Chat was misleading me about possible solutions, providing calls that were never supposed to get the number of icons xD

@4meters
Copy link

4meters commented Oct 1, 2023

I will leave this here, I was looking for solution to fix drag and drop not working on build 22621 on account with administrative rights and UAC disabled and this worked for me.
If You have newest windows build installed 22621 or 22622 and you had before disabled UAC, do this:

  1. Check if in regedit, (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System) EnableLUA is set to 1 and reboot.
  2. Then go to UAC settings and set to recommended level and reboot.
  3. Now You should have drag and drop working. You can also set back UAC (in menu from method 1) to disabled and reboot. Drag and drop still will be working. Remember to not change EnableLUA in regedit to 0, it propably needs to be 1 to work.

@LiquidatorFX
Copy link

I will leave this here, I was looking for solution to fix drag and drop not working on build 22621 on account with administrative rights and UAC disabled and this worked for me. If You have newest windows build installed 22621 or 22622 and you had before disabled UAC, do this:

  1. Check if in regedit, (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System) EnableLUA is set to 1 and reboot.
  2. Then go to UAC settings and set to recommended level and reboot.
  3. Now You should have drag and drop working. You can also set back UAC (in menu from method 1) to disabled and reboot. Drag and drop still will be working. Remember to not change EnableLUA in regedit to 0, it propably needs to be 1 to work.

This does not work for the built-in administrator account (In the Windows operating system, the built-in superuser administrator account -- the first account created when the OS was installed -- has the highest permissions of any profile on the computer system. That means the built-in administrator account has elevated administrator privileges to do anything on the system without requiring confirmation. The built-in administrator account can bypass all user access control (UAC) protections). Since the superuser automatically bypasses all restrictions - any kind of manipulation is obviously useless and the built-in drag and drop, which is somehow tied to enabling/disabling UAC, does not work on the superuser account.... another bug of Wndow 11 and this utility solves it in my case this problem

@HerMajestyDrMona
Copy link
Owner

HerMajestyDrMona commented Oct 2, 2023

Aren't you a bit scared to use that superuser administrator account on such a buggy system like Windows?

From what I understand, each process you start gets unlimited permissions, even the web browser. You don't even need to run the program as administrator, because it is done this way automatically. You probably have your reasons to use your PC this way, but in my opinion it's extremely risky. I keep UAC enabled even with the notifications on. Sometimes it's hard to change system settings (e.g. need to change owner / give permission to system registry keys before I can edit them), but it's still not that big deal to take a risk like this.

@LiquidatorFX
Copy link

Why be afraid? What is the risk?
I use the principle of setting up the OS and programs once (and this takes me a couple of days) and making a full 100% backup to a third-party storage device, so any critical failure returns to the last stable state from the other storage device in 3-5 minutes.
The reason is that I want to control the OS, and not the OS should control me. The OS should be a convenient tool, and not create additional obstacles and inconveniences to my actions......this is exactly what I consider UAC to be - for an inexperienced user it is perhaps a useful thing that makes you think once again whether it is worth running or not launching this or that another application, and for those who understand a little more what exactly it does, this is an additional annoying element, so I use the account where its influence is minimized and does not cause additional irritation from using the OS.
If you are talking about the risk of losing personal or other data? Don’t tell me... 99.99999% of Windows users voluntarily leaked their data to Google, Instagram, Facebook, etc., and your home PC with your photos and a bunch of useless files is of no global interest, but for the pleasure of those who have something really important - hardly uses a product like Windows from Microsoft ;)

@HerMajestyDrMona
Copy link
Owner

I mostly meant the security vulnerabilities in Internet Browsers, which are not that rate. And obviously hundreds of normal Windows vulnerabilities. So yeah, it would feel unsafe to even make online shopping knowing that some running script can have full access to your OS. With UAC enabled, most of malicious code still won't have access to your entire system and can cause less harm. With UAC disabled, programs are still running in normal user mode, unless the program decides to start "as administrator". But what you are doing, by using the built-in Administrator account is forcing literally every program on your PC to run with maximum privileges, even when it doesn't really intend to.

So yeah, leaking data to Google, Facebook, Microsoft or other companies is still not as terrifying as leaking it to hackers with seriously bad intentions.

@LiquidatorFX
Copy link

LiquidatorFX commented Oct 4, 2023

I mostly meant the security vulnerabilities in Internet Browsers, which are not that rate. And obviously hundreds of normal Windows vulnerabilities. So yeah, it would feel unsafe to even make online shopping knowing that some running script can have full access to your OS. With UAC enabled, most of malicious code still won't have access to your entire system and can cause less harm. With UAC disabled, programs are still running in normal user mode, unless the program decides to start "as administrator". But what you are doing, by using the built-in Administrator account is forcing literally every program on your PC to run with maximum privileges, even when it doesn't really intend to.

So yeah, leaking data to Google, Facebook, Microsoft or other companies is still not as terrifying as leaking it to hackers with seriously bad intentions.

Are you a famous world-class billionaire? ;)
Do you have anything on your PC that might be of interest to hackers? ;)
Do you think hackers and other idiots need to hack you?
I’ll tell you a secret - these fables about vulnerabilities and other blah blah blah are spread by Microsoft itself and the like, so that everyone thinks how much they care about your security on the network, so that you install a “safe product”....
Therefore, do not exaggerate the importance of your PC; nothing valuable or significant (from the financial side) is stored on it, so that this data is of interest to real hackers; ) Therefore, this paranoia “about being hacked through vulnerabilities in the software” looks like baby talk to me, because if a real hacker needs to hack someone, no UAC, much less other pseudo-defenders and firewalls available to ordinary people, will stop him; )
Therefore, you should worry less about this - your PC as a whole is of little interest to anyone, like mine etc., since there are tons of such people on the Internet and there’s essentially nothing to take from them, but I think those who have something to steal They don’t use Microsoft products at all, but write their own for internal consumption ;)
In the many years that I have been using the Internet, I have not seen a single virus on my PC, not a single antivirus or firewall trigger except for keygens for programs;) Therefore, it’s funny for me to read about some imaginary far-fetched vulnerabilities.

@Mast3r0mid
Copy link

Mast3r0mid commented Oct 4, 2023

some changes and finally works for me(buggy but working) : OS Build 22621.2361 and UAC off
i have to mention that i don't use search btn so you may need to hide that first,

PrimaryScreen.hWndTray = FindWindow(L"Shell_TrayWnd", nullptr);
      if (PrimaryScreen.hWndTray) {
            PrimaryScreen.hWndStartBTNClass = FindWindowEx(PrimaryScreen.hWndTray, 0, L"Start", nullptr); // Start Btn hWnd
            GetWindowRect(PrimaryScreen.hWndStartBTNClass, &startbtn); // Get StartBtn position
RECT hWndTryNtfy;

    GetWindowRect(PrimaryScreen.hWndTrayNotify, &hWndTryNtfy);

     //std::cout << "Taskbar Window Rect: " << rect.left << ":" << rect.right << ":" << rect.bottom << ":" << rect.top << "\n";
    
    TaskbarWindowWidth = hWndTryNtfy.left - startbtn.right; // Get taskbar width From left corner of TrayNotif to right side of 
      StartBtn maybe we need some gap between TrayNotif and running apps icon so items on the taskbar will detect correctly

and finally add

|| WindowUnderMouse == hWndTray

where you check mouse position on the Tray

you may need some adjustments and ,for sure, optimisation

i'll use my buggy version until the Next official release :D

@HerMajestyDrMona
Copy link
Owner

@Mast3r0mid I'm not sure how it's supposed to work:

Screenshot 2023-10-05 210554

It seems to return the 1440 for me (on my 1920x1080 laptop).

Maybe it helps when the Start menu button is in the middle? But I think most of people set it back to the right...

@boromyr
Copy link

boromyr commented Oct 5, 2023

hotfix 2 seems to work fine for me.
I'm waiting for the next stable release, I still use this tool like many others.

@HerMajestyDrMona
Copy link
Owner

Which one is Hotfix 2? The second .exe on mega which I uploaded?

The offset solution is bad. It sometimes works, sometimes doesn't. We need to figure out a better one.

The best thing would be finding how it's dependent by the other open apps. Like, why does it sometimes resize every 1, 2 or 3 icons when they're closed? Maybe they did some broken (as usual) "improvement" for the centered start menu.

@boromyr
Copy link

boromyr commented Oct 6, 2023

Yes, I am referring to the second .exe. In the meantime I'm happy with this temporary solution, if I notice any bugs I'll report them.

@Mast3r0mid
Copy link

Mast3r0mid commented Oct 14, 2023

Thank you for your valuable work and ideas. I've noticed that your app isn't currently functioning, and I appreciate the effort you've put into it.
In the spirit of contribution, I've developed an app that may help fill the gap.
You can find the app in my repository
I'd be delighted if you could give it a try, and your feedback, in the form of a review, would be greatly appreciated

@circcc
Copy link
Author

circcc commented Oct 14, 2023

Thank you for your valuable work and ideas. I've noticed that your app isn't currently functioning, and I appreciate the effort you've put into it. In the spirit of contribution, I've developed an app that may help fill the gap. You can find the app in my repository I'd be delighted if you could give it a try, and your feedback, in the form of a review, would be greatly appreciated

Thanks, It's perfect!
Tested on Windows 11 23H2(22631.2428)

@HerMajestyDrMona
Copy link
Owner

HerMajestyDrMona commented Oct 15, 2023

Thank you for your valuable work and ideas. I've noticed that your app isn't currently functioning, and I appreciate the effort you've put into it. In the spirit of contribution, I've developed an app that may help fill the gap. You can find the app in my repository I'd be delighted if you could give it a try, and your feedback, in the form of a review, would be greatly appreciated

Oh, so you use some Taskbar.TaskListButtonAutomationPeer, which is the UI Automation framework on C#. I don't think it would be as easy with C++.

Does it work for the icons that currently don't have the window open? Generally, Windows11DragAndDropToTaskbarFix allows many configuration options which not only allowed to restore the drag and drop, but added new features to it. So while it might be good to use something that works with UAC, I still think it would be great to fix the current W11DADTTF which has many problems detections, accidental drags prevention, support for the left hand users and more. On the other hand, since it's not needed by 99.5% of users now, maybe it's not worth the efforts.

@LiquidatorFX
Copy link

LiquidatorFX commented Oct 16, 2023

Thank you for your valuable work and ideas. I've noticed that your app isn't currently functioning, and I appreciate the effort you've put into it. In the spirit of contribution, I've developed an app that may help fill the gap. You can find the app in my repository I'd be delighted if you could give it a try, and your feedback, in the form of a review, would be greatly appreciated

TaskBar DragAndDrop(NO UAC) v.1.0.1-- Works perfect! Thank you! (tested Win 11 pro 22621.2428)

@Mast3r0mid
Copy link

Oh, so you use some Taskbar.TaskListButtonAutomationPeer, which is the UI Automation framework on C#. I don't think it would be as easy with C++.

Does it work for the icons that currently don't have the window open? Generally, Windows11DragAndDropToTaskbarFix allows many configuration options which not only allowed to restore the drag and drop, but added new features to it. So while it might be good to use something that works with UAC, I still think it would be great to fix the current W11DADTTF which has many problems detections, accidental drags prevention, support for the left hand users and more. On the other hand, since it's not needed by 99.5% of users now, maybe it's not worth the efforts.

Yup, UI Atomation
my app is a hobby project that I use myself. It's making slow but steady progress, and it works.
Although my app is relatively new compared to your great app, And as you mentioned, 99.5% of users may not need it. However, we are part of that 0.5% who find it valuable. lol

@HerMajestyDrMona
Copy link
Owner

I actually included the C++ UI Automation (with help of GPT-4). I am able to count the number of icons on the taskbar now, however it seems like it's actually a bug after Windows updates, not really a problem with this app. It seems like they start counting apps window even with including the logo windows button. So even though I have the number of icons on the taskbar correctly detected, there are still some minor issues detecting which icon ID it is. I would probably need to rebuild this program to use it fully, but that will require to take care of all the other functions :( So I think I'll just find a way to return the coordinates of the first icon, then the last icon and determine the width this way :)

@HerMajestyDrMona
Copy link
Owner

Okay...

I think the program is fixed for now: https://github.com/HerMajestyDrMona/Windows11DragAndDropToTaskbarFix/releases/tag/v.2.4.0.0-release

I didn't test how it behaves on multi-monitor though ;(

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

No branches or pull requests

6 participants