Solved

UAC and Runtime Themes

Posted on 2014-09-23
5
408 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
  • 3
  • 2
5 Comments
 
LVL 25

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 25

Accepted Solution

by:
Sinisa Vuk earned 500 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 25

Expert Comment

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

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now