How do I elevate my installer exe with admin privileges? - 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!

vssinc
Posts: 1
Joined: Fri Aug 13, 2010 7:14 pm

How do I elevate my installer exe with admin privileges?

I need to give the install exe elevated administrator privileges when initially loading. If the user’s windows has UAC mode enabled under Vista and Windows 7, the install fails because these privileges are not set. My install has dll functions that are performed in the “Begin” in the “InstallUISequence” under “Custom Actions” that need these elevated privileges.

I have checked the box “Run only if user has administrator privileges” under “Launch Conditions”. This does not elevate it to the level I need.

My dll functions have to be run before the install begins, so I can’t use the “…with no impersonation” because it is not available in that early in the “Begin” sequence.

Therefore, how can I add elevated administrator privileges to the exe upon loading the install? I need to embed a manifest somehow in Advanced Installer and I’m not sure how to do it. Or is there another way to accomplish these elevated privileges from the beginning of the install?

I would appreciate any help.

Thanks,
Ron
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: How do I elevate my installer exe with admin privileges?

Hi Ron,

This is very easy, the manifest will be automatically inserted by Advanced Installer in your setup if you go to Media page, Bootstrapper tab
and set the "Execution Level" combobox to "Require Administrator".

Please let us know if you have other questions.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”