How to check the invoker's privileges.?

Jun 30, 2010 at 12:45 AM
Edited Jun 30, 2010 at 12:51 AM

I need to check the user's privileges before staring install. (must be administrator, the step need being done in windows XP, because it has no UAC)

How can I do it?

Coordinator
Jun 30, 2010 at 12:44 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Jun 30, 2010 at 12:45 PM

You can't do it in the bootstrapper. I've created a feature request, if you really need it, you should implement it.

For the time being, I would recommend doing it in the MSI. With WIX it's as simple as checking that the PRIVILEGED property exists.

Jul 1, 2010 at 11:52 PM

I think this is useful in this case:

I want to have DNI calling .net framework installer by parameter /passive. If the invoker hasn't enough privilege, .net framework installer will terminate and return an error code.

I just want tell user what has happened.  I can't do it in WIX as the installer I created by WIX isn't running at that time.

Maybe the better way is adding an "error code - message" table to DNI. Then we can show different message to user for each of the error code.

 

Coordinator
Jul 4, 2010 at 8:16 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Jul 4, 2010 at 8:17 PM

Makes total sense to me.