cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
anilkumar_mca
Level 8

how to launch an application with admin privilages?

Hi,
Project Type: Installshield 2009 msi
Issue:
I am able to launch my application with the shortcut created at
start -> program files-> -> application.exe in 2003/XP
but in windows 2008 i am getting error as "Access Denined"
So, for 2008 I have to select "Run as Admininstrator"(which is available by right click on application.exe) to launch my application....
Is it possible to launch directly as in 2003/XP?
Labels (1)
0 Kudos
(7) Replies
ChandanOmkar
Level 8

Click on Release in installation designer tab. Go to setup.exe tab and chage the required execution level to 'Administrator'. build the project. The setup.exe will build with a shield icon.
0 Kudos
anilkumar_mca
Level 8

Hi ChandanOmkar,
Thanks for your replay and thanks for your information.... but my requirement is:-
"I want to open a application.exe which is available as shortcut and which is created by my installer project with "Administrative privilages"
0 Kudos
Reddy611
Level 6

Hi ,

I was faced this same problem on vista .

but i solved this problem using UAC manifasto file adding in test.exe code itself.

after that if the user installs the applicaiton in the administrator mode..again if he tryes open with another user also he can able run the application with out going to right click option on the test.exe open as a administrator.
0 Kudos
anilkumar_mca
Level 8

Hi Reddy611,

Thanks for your replay, is it possible to solve my issue without changing any code or settings except in installshield?
0 Kudos
anilkumar_mca
Level 8

Hi,
Can anyone give me a solution for this 😞
0 Kudos
Pete_Delgado
Level 4

anilkumar_mca wrote:
Hi,
Can anyone give me a solution for this 😞


There isn't a "solution" for this as you have defined it.

Things you could possibly do include adding an application compatibility db entry that will allow your application to think it is running underneath a previous verison of the operating system (assuming that it worked correctly there). See the app compatibility articles on MSDN for more information.

Otherwise, your best bet is to determine which privileges your application is requesting and why it needs them and *fix* your application to not need them.

If your application is one of those few that does indeed require elevation, your should imbed a manifest within it using the appropriate privilege request. This resource can be linked into your executable after development (if necessary), though it will change the PE header so that if you have hidden bugs within your application they may suddenly show themselves!

-Pete
0 Kudos
yamakamyar
Level 6

To further answer your question:

You will have to create a manifest and associate it with you application as an embedded ressource.

How are you compiling your executable with C++, VB, .NET?
0 Kudos