locked
Will Consent Dialog be popped up for exe invoked from another exe? RRS feed

  • Question

  • We have an windows .Net application, our main target platform till now was XP but now we have to consider Vista as well.

    We were going through the list of changes required in our application. I had a doubts in mind for which I am looking for some help.


    We have an upgrade module which consist of 4 different tools which run as a separate process one after another depending upon the configurations and requirement of the upgrade to be applied.  As these tools are expected to access Program Files area, and registry for registering different components on the system, I am planning to embed manifest files inside these tools.


    My problem is on Vista when OS detects that these tools are expected to run with full privileges it will popup the consent dialog box.  If consent dialog box is popped up for the first tool then its fine but if it is popped up for all the tools that are expected to run then it will be very annoying for the user.

    I am using Process class for invoking these exes.


    My question is if one exe which has manifest embed inside it, which will make this exe to run with admin privileges, invokes another exe also having similar manifest for running under admin privileges, then will the consent dialog will be popped up for the second exe as well?


    Thanks in advance for your help guys.

    Monday, October 20, 2008 5:42 PM

Answers

  • Hi Saurabh

     

    Like I stated in my reply to your other message, these questions would be best answered by developer support.

     

    MSDN Forums: Software Development for Windows Vista
    http://forums.microsoft.com/MSDN/default.aspx?ForumGroupID=24&SiteID=1

     

    However, it's my understanding that if a program that has already been elevated uses a manifest with the 'RunAsInvoker' tag for any subsequent process that these processes will run elevated and bypass the UAC prompt.

     

    Here is more information about this subject.

     

    Windows Vista for Developers – Part 4 – User Account Control - Kenny Kerr:
    http://weblogs.asp.net/kennykerr/archive/2006/09/29/Windows-Vista-for-Developers-_1320_-Part-4-_1320_-User-Account-Control.aspx


     

    Download details: Windows Vista Application Development Requirements for
    User Account Control Compatibility:
    http://tinyurl.com/2pf8n3

     

    Hope this helps.

     


    If this post helps to resolve your issue, click the Mark as Answer button at the top of this message.

    Ronnie Vernon
    Microsoft MVP
    Windows Desktop Experience
    Tuesday, October 21, 2008 9:31 PM
    Moderator
  • Hi Ronnie,
    Thanks for your reply.

    You are right. Looks like the elevated execution level is passed on to the
    subsequent appliaction that are run.

    I tried it using two simple application. Only first one poped up the consent dialog and second one ran without any dialog.

    Thanks once again.


    Friday, October 24, 2008 5:43 AM

All replies

  • Hi Saurabh

     

    Like I stated in my reply to your other message, these questions would be best answered by developer support.

     

    MSDN Forums: Software Development for Windows Vista
    http://forums.microsoft.com/MSDN/default.aspx?ForumGroupID=24&SiteID=1

     

    However, it's my understanding that if a program that has already been elevated uses a manifest with the 'RunAsInvoker' tag for any subsequent process that these processes will run elevated and bypass the UAC prompt.

     

    Here is more information about this subject.

     

    Windows Vista for Developers – Part 4 – User Account Control - Kenny Kerr:
    http://weblogs.asp.net/kennykerr/archive/2006/09/29/Windows-Vista-for-Developers-_1320_-Part-4-_1320_-User-Account-Control.aspx


     

    Download details: Windows Vista Application Development Requirements for
    User Account Control Compatibility:
    http://tinyurl.com/2pf8n3

     

    Hope this helps.

     


    If this post helps to resolve your issue, click the Mark as Answer button at the top of this message.

    Ronnie Vernon
    Microsoft MVP
    Windows Desktop Experience
    Tuesday, October 21, 2008 9:31 PM
    Moderator
  • Hi Ronnie,
    Thanks for your reply.

    You are right. Looks like the elevated execution level is passed on to the
    subsequent appliaction that are run.

    I tried it using two simple application. Only first one poped up the consent dialog and second one ran without any dialog.

    Thanks once again.


    Friday, October 24, 2008 5:43 AM
  • Hi Saurabh

     

    Your welcome, very glad this helped.

     

     



    Ronnie Vernon
    Microsoft MVP
    Windows Desktop Experience
    Friday, October 24, 2008 3:48 PM
    Moderator