Post a reply to the thread: How can we change Execution Level runtime
Click here to log in
What's the name of our main installation product (in uppercase letters), directly followed by the current year?
You may choose an icon for your message from this list
Will turn www.example.com into [URL]http://www.example.com[/URL].
Re: How can we change Execution Level runtime Yes, it helps us to achieve our requirement. Thanks you very much Friedrich for the demo application.
Re: How can we change Execution Level runtime
Re: How can we change Execution Level runtime Hello, You have several different options. I have uploaded a quick-and-dirty demo project: https://www.setupbuilder.com/projects/UserOption.zip By default, it runs (on UAC-aware) operating systems "asInvoker" (per-user). You can select "per-machine" and it re-starts itself as "requireAdministrator" (per-machine).- Does this help? Friedrich
Re: How can we change Execution Level runtime Thanks for the immediate reply! What do you mean by wrapper? Can you please elaborate "start the main installation elevated from this wrapper." ?
Re: How can we change Execution Level runtime Hello, the manifest in an executable determines the execution level. So Windows does not allow to change the execution level "dynamically". What you have to do in this case is to use an "asInvoker" wrapper. This runs by default "per-user". Ask the "per-user" / "per-machine" question and if it is a per-machine install, start the main installation elevated from this wrapper. BTW, never use "highestAvailable". Use asInvoker or requireAdministrator. Windows does not allow to write to protected resources (e.g. Program Files, Windows, HKEY_LOCAL_MACHINE) from a non-elevated running application. Friedrich
How can we change Execution Level runtime Hello, I am not sure whether it is possible or not, Can we change UAC execution level dynamically? Requirement: 1. We want to show user 2 options : A. Machine Wide B. Per-User 2. If user selects Machine Wide option then we want to ask user for permission(UAC) and set installation path in Program Files.(like highestAvailable) 3. If user selects Per-User option the we don't want to ask user permission and set installation in LocalAppData.(like asInvoker) I guess its not possible but can we do installation in Program Files without UAC permission. Thanks in Advance!
How can we change Execution Level runtime
Forum Rules