|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Oct 2005
Location: Chandler, AZ
Posts: 8
|
I'm using this to launch my app when the setup finishes:
!define MUI_FINISHPAGE_RUN "$INSTDIR\RemindMe.exe" The problem is that my setup program is running with admin permission level (which I need), but it then launches my program with these elevated permission levels. I want to launch my program with the permission levels manifested in the application (regular). I tried using MUI_FINISHPAGE_RUN_FUNCTION with Exec or ExecShell instead, but both of those also launched my app with admin permissions. Any ideas how to do this? Thanks, Mark Last edited by Beiley; 27th October 2009 at 22:53. |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Mar 2003
Posts: 571
|
I use the UAC plugin to do this. Some of my installer runs with administrator privileges and some at the user's normal level; at the end the installer runs a program with the user's privileges.
http://nsis.sourceforge.net/UAC_plug-in Be sure to read the UAC plugin's documentation and look at the example scripts before trying to use it. |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2005
Location: Chandler, AZ
Posts: 8
|
I found/tried the SAFER plug-in. This seems to work for me, but I had 2 questions/concerns:
1) Since the SAFER.dll is dependent on CreateProcessAsUser() and that function isn't available until XP, how will this be able to work on OS's like 98? Even if you use SAFER::SupportsSAFER it seems the DLL won't be able to load for even this call on 98? I don't have easy access to 98 to test it. 2) I have to specify a permission level (NORMAL/CONSTRAINED). Is this starting my app exactly the same way as I have manifested in my app? Thanks, Mark |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Oct 2005
Location: Chandler, AZ
Posts: 8
|
Hi pengyou,
Thanks for the pointer to UAC. I'll check it out... Mark |
|
|
|
|
|
#5 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
|
Beiley: CreateProcessAsUser also exists on 2000, the SAFER api itself does not IIRC, but that is besides the point, the SAFER api was not updated for Vista and it will not do what you want on NT6+, so, if you want to enter a world of pain, use the UAC plugin, or if you want to take the easy way out, just disable the run checkbox
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Oct 2005
Location: Chandler, AZ
Posts: 8
|
Thanks Anders. I think I'll just leave it as is, and let my app launch as admin. It works fine as admin too, but I just thought it cleaner to launch with normal permissions.
Thanks again, Mark |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|