Evelated Custom Action in per-user installation using UAC - 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!

antidotcb
Posts: 34
Joined: Mon May 17, 2010 8:10 am

Evelated Custom Action in per-user installation using UAC

Hello, there

I have a per-user installation project, it works fine right now.
But now I need to add the following behaviour to my project:
- additional dialog with check-box
- if check-box is checked, install Service (each user on machine can have its own Service - don't ask me why it's so)
- to install Service I need to run my custom action Elevated

How can I request elevated context for my CA?
It should use UAC, as standard method for providing admin credentials, during runing of my CA.
antidotcb
Posts: 34
Joined: Mon May 17, 2010 8:10 am

Re: Evelated Custom Action in per-user installation using UAC

Is there a possibility to run another msi package silently?
This package will do per-machine installation, and will ask UAC and be elevated.
It should be configurable to get parameters from the first one
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Evelated Custom Action in per-user installation using UAC

Hello,

You can try using the "Per User (with administrator rights required)" installation type in the Install Parameters page. This way the installation should run per-user, but elevated. In order to run a custom action with full privileges, make sure it uses the Deferred with no impersonation option.

Packages can be run silently by passing the /qn parameter to them when run, eg.:

Code: Select all

msiexec.exe /i /qn "C:\setup.msi" 
You can pass data to an installer by setting properties in the command line when launching them:

Code: Select all

msiexec.exe /i /qn "C:\setup.msi" MYPROPERTY="some data"
Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”