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

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) :( :o :shock: :? :cool: :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: (wave) :ok: (nod)
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: [FIXED] Bug in MouseEvents at startup with elevated Dexpo...

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

Post by Another John » 03.04.2014 19:27:47

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

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

Post by Another John » 13.03.2014 18:05:35

Wow, thank you! :D

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

Post by Patrick » 13.03.2014 18:03:32

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

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

Post by Another John » 13.03.2014 17:53:17

Nope. Disabled as per default.

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

Post by Patrick » 13.03.2014 17:45:26

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

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

Post by 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?

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

Post by 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.

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

Post by Another John » 13.03.2014 17:01:17

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

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

Post by Patrick » 13.03.2014 16:59:34

Weird. Any idea what that means? :D

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

Post by Another John » 13.03.2014 16:53:49

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

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

Post by 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?

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

Post by 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.

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

Post by Patrick » 13.03.2014 16:17:58

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

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

Post by Another John » 13.03.2014 16:11:40

Yes, it does. Tried multiple times.

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

Post by 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"?

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

Post by 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

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

Post by 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?

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

Post by 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.

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

Post by 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.

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

Post by 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)

Top