PREMISEI 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
---
SETUP0. 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 BUG5. 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 76. 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 BUG5. 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=tray7. 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 78. 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)