GabrielBarbu wrote:
Whether the installer elevates itself or not can not be conditioned.
You will have to use "Per user with administrator rights required" install type from the install parameters page.
Don't tell me what I can't do! © John Locke
I don't need entire installation that will require administrator rights, and show up UAC prompt always during installation progress.
As I already mentioned,I have done the case (in sample above, using RunAsAdmin):
1) it can run per user installation
2) it doesn't require administrator privileges on start
3) in doesn't have UAC prompt on start
4) it can be installed successfully by standard user without UAC prompt, if "install service" check box is unchecked
5) it can be uninstalled without UAC prompt when "delete service" check box is unchecked
6) it can install service conditionally, in such case it shows UAC prompt and install service successfully
7) it can uninstall service conditionally, also using UAC prompt
The only restriction of already implemented installer - that it uses RunAsAdmin CA.
It's UI CA, and it cannot be setup as deffered, because it uses Properties - RunAsAdminCmd & RunAsAdminFile.
I only ask you to disclose details on RunAsAdmin CA implementation. Point me out the WinAPI it uses for showing UAC prompt.
How it tell to Windows to show UAC prompt, how it run code elevated after this?
Of course, It will be great if Advanced Installer Team will implement deffered RunAsAdmin variant, but I can do it myself if I will know the API.
Such behavior is very often looked by other installation developers. It's great possibility to have per-user installation, with conditional execution of CA with elevated priveleges.
FOLLOW US
Get the latest news in Application Packaging