views:

248

answers:

2

When a user has restricted rights on his/her computer and runs my Inno Setup installer, Windows pop-up an administrator login prompt.

The problem is that when the administrator types in his/her username and password and logs-in, Inno Setup thinks that he or she is the logged in user and installs my app for that user instead of the original one. (I'm installing files in the {userappdata} dir)

Is there a way to overcome this limitation and install for the original restricted user?

A: 

Specify PrivilegesRequired=none and construct your script to work with or without admin rights. See here for more details:
http://www.kinook.com/blog/?p=53

Kyle Alons
This is a no-go. Microsoft itself recommends to place your app in PF, and definitely not in appdata. Not to talk about registering COM Dlls and stuff like that.There must be a simple workaround for this problem, I doubt that the author didn't think about it...
Steve
If the user doesn't have admin rights, it's the only way.
Kyle Alons
Since this is an app I install personally, admin rights are granted by the sysadmin who is always there. The problem is that the program is installed for the sysadmin after he/she logs-in. There must be an another way to do this...
Steve
A program installed by an elevated admin user is accessible to all users. If {group} and {commondesktop} are used for icons, they will be visible to all users.
Kyle Alons
The page you linked features a possible solution in one of the comments, thus I'm accepting this as an answer!
Steve
+2  A: 

A thing you can consider is to install all stuff into PF first. Then when the application executes for the first time, copy something from PF to {userappdata}.

As the user can execute the app, we are sure the necessary files can be copied from PF to {userappdata} successfully.

Lex Li
This is a good approach. I'd probably prefer {commonappdata} over {pf} for the template but that might just be a matter of taste.Avoiding to ever write anything to user-specific areas from an installer on principle saves you from a lot of headaches.
Oliver Giesen