Elevated Privileges on Windows
I'm writing an installer with InstallBuilder for an Intuit QuickBooks Desktop app. Intuit Desktop apps have to run two command-line arguments as part of their registration process:
1.) [applicaiton-name] -regserver. This runs with elevated privileges and registers the app as a COM server.
2.) [application-name] -subscribe. This subscribes the program to certain QuickBooks events. However, this should NOT run with elevated privileges.
So, I can obviously make the install in InstallBuilder run as Admin, and #1 succeeds just fine. However, is there any way I can get #2 to run properly using InstallBuilder? I just want it to run as the current user.
I did try doing the following:
<runProgram>
<program>${installdir}/MyApp.exe</program>
<programArguments>-subscribe -silent</programArguments>
<runAsAdmin>0</runAsAdmin>
</runProgram>
But it won't take the "runAsAdmin" for "runProgram".
Thanks!
-
Hi David,
Could you try the following snippet to run the script with lower privileges?
<finalPageActionList>
<runProgram progressText="Launch Application">
<program>explorer</program>
<programArguments>"${installdir}\MyApp.exe" &</programArguments>
</runProgram>
</finalPageActionList>Regards,
Michiel
Please sign in to leave a comment.
Comments
1 comment