Run Application always as an administrator - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

karan1337
Posts: 2
Joined: Mon Aug 08, 2011 6:40 pm

Run Application always as an administrator

Hello,

I'm copying a set of files to my application's folder in program files. Within it, i have my application's exe file. I want the exe to always run as administrator when used on the end user's machine. Also, the shortcuts pointing to the exe should also execute as an administrator.

Please guide me.

Thanks in advance.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Run Application always as an administrator

Hello and welcome to Advanced Installer forums,

In Windows Vista or above, the correct way to mark your applications is to embed an application manifest within your program that tells the operating system what the application needs. The Windows application manifest has been enhanced with attributes that permit developers to mark their applications with a requested execution level.

Here is a Microsoft article to help you with this:
http://msdn.microsoft.com/en-us/library/bb756929.aspx

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
karan1337
Posts: 2
Joined: Mon Aug 08, 2011 6:40 pm

Re: Run Application always as an administrator

thanks.

However i didnt apply the manifest method. Saw some previous posts on the forum and created a registry entry of type REG_SZ in HCU\Software\Microsoft\WindowsNT\CurrentVersion\AppCompatFlags\Layers with the value as the path of my application and data as RUNASADMIN.

It worked!

Thanks for the reply.

Return to “Common Problems”