Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

UAC and Runtime Themes

Posted on 2014-09-23
5
Medium Priority
?
546 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 28

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 28

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 28

Expert Comment

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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
Unable to change the program that handles the scan event from a network attached Canon/Brother printer/scanner. This means you'll always have to choose which program handles this action, e.g. ControlCenter4 (in the case of a Brother).
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

877 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