PDA

View Full Version : Run Administrator installer from Invoker



NewsArchive
08-19-2013, 02:49 AM
Hi all,

For our main application install, I've lowered the required UAC execution
level to "asInvoker", which means that the install will auto-run when
upgrading existing installed application (without having to prompt for UAC).
Tested, and works nicely in this environment.

I do, however, require that the first time the application is installed, the
folders get created with read/write, registry keys, firewall exceptions....
the normal admin stuff is done. I'm loath to upload and maintain 2
installers (one for upgraders and one for new installers), so I've created a
small "stub" install (requireAdministrator) to run from the main installer -
to perform the various admin tasks required. This would ideally be called
from within the main install, if the various admin tasks have not been done
(as listed above).

However, I cannot find a way of running this stub install, as it appears
that once the main install is running (as Invoker), it won't prompt to
elevate to Admin, so it basically just ignores the "Run program" command -
if that application needs to run as administrator. Is there any way this can
be done, or do I have to create 2 full blown installers?

Geoff

NewsArchive
08-19-2013, 03:16 AM
Hi Geoff,

In some of the consulting projects, we are doing the following (see attached
screenshots).

The setup.exe "loader" is 'asInvoker' manifested. That means it executes
non-elevated by default (so no elevation prompt). This loader can then
start the "real" installer (also 'asInvoker' manifested) elevated or
non-elevated (based on some script logic).

Friedrich