Using UAC Exec as vista admin
Hi,
I have spend the last few days trying to create an installer that does the following:
The installer is started with RequestExecutionLevel user and includes five sections. Four of those sections have functions that need to be executed as a user, those work fine.
The fifth section will start a executable, but it requires a vista admin account. The executable I try to start has the "RequestExecutionLevel admin" setting.
I have tried to use the UAC plugin, but it will ask for a admin password when starting the installer. Most users will not require the fifth option and therefore I would like the installer to ask for an admin password only when choosing or executing the fifth option in the section list.
Example 1:
install_no5:
UAC::RunElevated
UAC::Exec '' '"$INSTDIR\${APPFILE}"' '' ''
This causes the installer to ask for a admin password, but after logging in the installer starts all over again from the top and the executable does not start.
Example 2:
install_no5:
ExecWait '"$EXEDIR\Setup.exe"'
This causes the executable to run when the user is an admin, but when the user is not an admin he will not execute anything.
I hope someone can point me into the right direction with this issue.