wxExecute on MS Vista Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Marcus Frenkel
Experienced Solver
Experienced Solver
Posts: 79
Joined: Thu Sep 25, 2008 12:14 am

wxExecute on MS Vista

Post by Marcus Frenkel »

I get error 704 elevation required when using wxExecute in MS Vista when the application (installer) that should be executed requires admin privileges. If the application doesn't require admin privileges then it gets executed ok.

The main wx application has the following line in the manifest:

Code: Select all

<requestedExecutionLevel level='asInvoker' uiAccess='false' />
Is it that the main application should also run with admin privileges in order to wxExecute another app that too requires admin privileges?

Any help on this?

Thx, Marcus
User avatar
doublemax
Moderator
Moderator
Posts: 19159
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Post by doublemax »

Use the source, Luke!
TrV
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 630
Joined: Wed Jul 04, 2007 1:12 pm

Post by TrV »

I can lead you to this thread where i came through Vista UAC.
But i'm really interested in knowing more about your manifest of your wx application.
chris_bern
Earned some good credits
Earned some good credits
Posts: 125
Joined: Wed Mar 05, 2008 3:30 pm

Re: wxExecute on MS Vista

Post by chris_bern »

Marcus Frenkel wrote:Is it that the main application should also run with admin privileges in order to wxExecute another app that too requires admin privileges?
Yes if you start it directly in wxExecute. To make UAC popup and ask for approval try this:

Code: Select all

wxExecute(wxT("cmd /C \"")+FullPathAndFileName+wxT("\""), ....
To avoid console window poping up use output redirection as explained in the docs for wxProcess & wxExecute.
Chris
Marcus Frenkel
Experienced Solver
Experienced Solver
Posts: 79
Joined: Thu Sep 25, 2008 12:14 am

Re: wxExecute on MS Vista

Post by Marcus Frenkel »

chris_bern wrote:

Code: Select all

wxExecute(wxT("cmd /C \"")+FullPathAndFileName+wxT("\""), ....
Works great, thx.
Post Reply