[FIXED] Bug in MouseEvents at startup with elevated Dexpo...

Post any technical problems or questions you have while using or configuring Dexpot.
Bug-Tracker
Another John
Posts: 13
Joined: 11.03.2014 21:52:38

[FIXED] Bug in MouseEvents at startup with elevated Dexpo...

Postby Another John » 12.03.2014 00:39:40

PREMISE
I have set Dexpot to run elevated at startup, along with a couple of other software, some of which require admin rights. It is convenient to be asked for admin credentials just once at startup, so I wrote a batch file that asks for such credentials, becomes elevated and then is able to start those applications without additional UAC prompts. To do I use a command line utility called winapiexec.exe ( http://rammichael.com/winapiexec ) which allows to run WinAPI functions through command line parameters, more specifically ShellExecute ( http://msdn.microsoft.com/en-us/library ... 85%29.aspx ). The advantage is that by doing so I can have a minimized, non-blocking UAC prompt (see also http://stackoverflow.com/questions/2178 ... on-purpose ).

However, I noticed that starting Dexpot with admin priviliges in "unconventional" ways leads to some buggy behaviours. I truly hope these bugs can be fixed :D

---
SETUP


0. Start with a fresh installation of Windows 7 x64 XP1 and a regular, non-admin account
1. Install Dexpot Common Controls
2. Unpack Dexpot 1.6.11.2394 Portable on the Desktop and run it
- check "Run as admin"
- disable SevenDex
- enable Mouse Events, with top-left corner for Full Screen Preview delayed by 700 msecs
3. Exit Dexpot
4. Place the utility winapiexec.exe on the Desktop

---
FIRST BUG


5. Put in StartUp the following entry/link:

Code: Select all

C:\Users\John\Desktop\winapiexec.exe shell32.dll@ShellExecuteW NULL "runas" "C:\Users\John\Desktop\Dexpot 1.6.11.2394\dexpot.exe" NULL NULL 7
i.e.

Code: Select all

<full_path_to_winapiexec.exe> shell32.dll@ShellExecuteW NULL "runas" "<full_path_to_dexpot.exe>" NULL NULL 7


6. Logoff and logon. The UAC notice will flash in the taskbar (as expected). Click on it and click Yes. Dexpot will load.
7. Now if you go to the top-left corner of the screen, either nothing happens (a brief flickering of the taskbar) or the "old/XP-style" of the full screen preview will appear. Only on subsequent tries the "styled" full screen preview will correctly appear.

---
SECOND BUG


5. Unpack XYplorerFree 13.80.0100 on the Desktop ( http://www.xyplorer.com/free.php )
(You may also want to disable all Internet connections, because if available XYplorerFree will try to download a locale file on first run, opening a prompt)
6. Place on the desktop a batch file named apps.bat containing the following

Code: Select all

start "" "C:\Users\John\Desktop\Dexpot 1.6.11.2394\dexpot.exe"
start "" "C:\Users\John\Desktop\XYplorerFree 13.80.0100\XYplorerFree.exe" /win=tray
i.e.

Code: Select all

start "" "<full_path_to_dexpot.exe>"
start "" "<full_path_to_XYplorerFree.exe>" /win=tray


7. Put in StartUp the following entry/link:

Code: Select all

C:\Users\John\Desktop\winapiexec.exe shell32.dll@ShellExecuteW NULL "runas" "C:\Users\John\Desktop\apps.bat" NULL NULL 7
i.e.

Code: Select all

<full_path_to_winapiexec.exe> shell32.dll@ShellExecuteW NULL "runas" "<full_path_to_apps.bat> NULL NULL 7


8. Logoff and logon. The UAC notice will flash in the taskbar (as expected). Click on it and click Yes. Dexpot and XYplorerFree will load.
9. Now if you go to the tray and click on the XYplorerFree icon, XYplorerFree window will either briefly flash or appear in a stable way, however no icon will appear in the taskbar, making thus impossible to restore it if minimized. (The other bug of the Full Screen Preview is still present)
Last edited by Another John on 03.04.2014 19:28:45, edited 1 time in total.

User avatar
Patrick
Developer
Posts: 7380
Joined: 04.03.2003 14:51:26

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Patrick » 12.03.2014 12:37:49

:dex:

First bug occurs when the DexControl plugin is not yet running, has nothing to do with elevation. Will be fixed in the next version. Thanks for reporting. :ok:

Second bug... I'll try that later.

Another John
Posts: 13
Joined: 11.03.2014 21:52:38

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Another John » 12.03.2014 13:10:43

Thank you heaps for your interest!
And good to know that the first bug can be solved. I thought that elevation through winapiexec was the cause because placing a link to dexpot in the startup folder ("the old school way" so to say) doesn't lead to the buggy behaviour.

User avatar
Patrick
Developer
Posts: 7380
Joined: 04.03.2003 14:51:26

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Patrick » 13.03.2014 15:41:23

I'm unable to reproduce the second problem. XYplorerFree displays correctly with a taskbar button. Do you have any other custom Dexpot settings, e.g. Desktop Rules or Application assignments?

Another John
Posts: 13
Joined: 11.03.2014 21:52:38

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Another John » 13.03.2014 15:47:19

Nope. I even tested in a VM with almost no customization in Windows or Dexpot except the ones stated in the first post. Could locale be the culprit? I'm on an Italian system.

EDIT: here's the log
Attachments
dexpot.log
(1.63 KiB) Downloaded 296 times
Last edited by Another John on 13.03.2014 15:56:25, edited 1 time in total.

User avatar
Patrick
Developer
Posts: 7380
Joined: 04.03.2003 14:51:26

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Patrick » 13.03.2014 15:56:08

No idea. I'm testing this on a German Windows 8.1 with English system locale.

Does the problem still occur if you don't put a link in StartUp, but just right-click on the apps.bat file and select "Run as administrator"?

Another John
Posts: 13
Joined: 11.03.2014 21:52:38

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Another John » 13.03.2014 16:11:40

Yes, it does. Tried multiple times.

User avatar
Patrick
Developer
Posts: 7380
Joined: 04.03.2003 14:51:26

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Patrick » 13.03.2014 16:17:58

Ok. What happens if you start the the batch file normally, not as administrator?

Another John
Posts: 13
Joined: 11.03.2014 21:52:38

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Another John » 13.03.2014 16:34:52

In that case it works fine. Dexpot itself asks for elevation, and after it has loaded if I click in the tray the XYplorer icon the XYplorer window shows up perfectly along with its button in the taskbar.

User avatar
Patrick
Developer
Posts: 7380
Joined: 04.03.2003 14:51:26

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Patrick » 13.03.2014 16:45:05

What if you run XYplorer as administrator manually without the .bat file and then also manually launch Dexpot?

Another John
Posts: 13
Joined: 11.03.2014 21:52:38

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Another John » 13.03.2014 16:53:49

Even that works fine - no missing windows/taskbar buttons. Tested thrice.

User avatar
Patrick
Developer
Posts: 7380
Joined: 04.03.2003 14:51:26

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Patrick » 13.03.2014 16:59:34

Weird. Any idea what that means? :D

Another John
Posts: 13
Joined: 11.03.2014 21:52:38

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Another John » 13.03.2014 17:01:17

That it can't be solved, I guess :(

User avatar
Patrick
Developer
Posts: 7380
Joined: 04.03.2003 14:51:26

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Patrick » 13.03.2014 17:11:58

Try adding "timeout /t 5" between the two start commands in apps.bat and then run it as administrator.

Another John
Posts: 13
Joined: 11.03.2014 21:52:38

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Another John » 13.03.2014 17:23:30

:shock: It works!! :ok:
So it's just a matter to give Dexpot the time fully load and catch every window?

User avatar
Patrick
Developer
Posts: 7380
Joined: 04.03.2003 14:51:26

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Patrick » 13.03.2014 17:45:26

Do you have the option "Settings > Switching Desktops > Desktop elements > Keep all taskbar buttons visible" enabled?

Another John
Posts: 13
Joined: 11.03.2014 21:52:38

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Another John » 13.03.2014 17:53:17

Nope. Disabled as per default.

User avatar
Patrick
Developer
Posts: 7380
Joined: 04.03.2003 14:51:26

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Patrick » 13.03.2014 18:03:32

Ok, should work without the timeout in the next version.

Another John
Posts: 13
Joined: 11.03.2014 21:52:38

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Another John » 13.03.2014 18:05:35

Wow, thank you! :D

Another John
Posts: 13
Joined: 11.03.2014 21:52:38

Re: Bug in MouseEvents at startup with elevated Dexpot, plus

Postby Another John » 03.04.2014 19:27:47

Thank you, everything seems to be fine now! :ok:


Return to “Support”

Who is online

Users browsing this forum: No registered users and 70 guests