?
Solved

UAC and Runtime Themes

Posted on 2014-09-23
5
Medium Priority
?
525 Views
Last Modified: 2014-09-24
Hi,

My Application Setup (App_Setup.exe) displayed the UAC Shield because it contains the word 'Setup'.
I do not want to elevate the App_Setup.exe.
I came across 'Enable Runtime Themes'and With this set the UAC shield goes off,
and my Setup program is not elevated and my task is accomplished.

Question
Why this behaviour as themes have nothing to do with Security ?
Will the behaviour be consistent across all windows/delphi versions ?

I use Delphi Xe2 currently and soon moving to Xe6. Also tested on WinXP/win7/win8.

Regards
Allan
0
Comment
Question by:Allan_Fernandes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 27

Expert Comment

by:Sinisa Vuk
ID: 40339151
According to this articles:
uac-five-most-common-install-failure-scenarios-and-workarounds
Understanding and Configuring User Account Control in Windows Vista
... if you set proper manifest into exe (setup exe at least) - then you will not have problems any more.
It is not Delphi related, but exe build old way (not using manifest file).
Use Inno setup and you will not have a problem with that.

...and when ms is in question .... nothing is certain.
0
 

Author Comment

by:Allan_Fernandes
ID: 40340768
I do not want to elevate the App_Setup.exe so I cannot use Manifest. Elevating changes the user, I want my application to run under same user as I work on Outlook.pst. What I want to know is
Why this behaviour as themes have nothing to do with Security ?
Will the behaviour be consistent across all windows/delphi versions ?
0
 
LVL 27

Accepted Solution

by:
Sinisa Vuk earned 2000 total points
ID: 40340890
Theming certainly adds manifest into exe - because manifest switch from old comctl (v5) to newer (v6).
http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175%28v=vs.85%29.aspx
As a result when manifest is in exe - Security check is fine. Again, it is not Delphi related - because MS windows request those. Will be in future some changes....does not depent on Delphi (Embarcadero) but Ms first. Adding manifest to your exe is very simple and one time job - like including this line after you build own manifest: {$R MyMan.RES}
http://delphi.about.com/library/bluc/text/uc111601a.htm
- description of manifest file:
http://msdn.microsoft.com/en-us/library/aa374191%28VS.85%29.aspx
Adding this manifest will trigger theming too.
0
 

Author Comment

by:Allan_Fernandes
ID: 40341768
Thanks for all the assistance. Added AsInvoker in custom manifest instead of requireadministrator and that works fine.
0
 
LVL 27

Expert Comment

by:Sinisa Vuk
ID: 40342509
yes, requireadministrator force application to be run as administrator
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
By default Outlook 2016 displays only one time zone in the Calendar. The following article explains how to display two time zones in one calendar view.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question