require Non-Admin Rights

Got a problem you cannot solve? Try here.
Post Reply
Micha
Posts: 5
Joined: Tue Aug 19, 2008 6:51 am

require Non-Admin Rights

Post by Micha »

Hi,

I'm trying to build an installer that does not require admin rights under Windows Vista or Windows 7. But I always get the prompt to elevate to admin rights, even with the "Administrator priviledges" checkbox unchecked. The installer has the "requires admin rights logo" (for lack of a better word :) ) in its icon. Even when I start a new project with the installaware wizard this behavior shows.

After some digging through this forum I found a thread that mentioned to replace the manifest of the dependent.exe file in the InstallAware folder.

http://www.installaware.com/forum/viewt ... min#p18415

In my case I changed it to requestedExecutionLevel level="asInvoker". Now the installer indeed no longer has a manifest with requestedExecutionLevel level="highestAvailable" and it does not show the "requires admin rights logo" under Vista or Windows 7. However when started it says that it does not have the correct privileges in a message box and then the installation stops. I've seen that when it is extracted the extracted installer executable still has requestedExecutionLevel level="highestAvailable" mentioned in its manifest, so pherhaps that is the problem now.

I am using InstallAware 7, how would it be possible for me to create an installer that does not require admin rights?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: require Non-Admin Rights

Post by MichaelNesmith »

You may need a later version of InstallAware for that - the Vista+ elevation issue is a pre-defined setting in InstallAware 9, for instance - you won't need to worry about manually hacking manifests.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Micha
Posts: 5
Joined: Tue Aug 19, 2008 6:51 am

Re: require Non-Admin Rights

Post by Micha »

Thanks for the response, I've been able to change the manifest of the dependent.exe file and the miastub.exe file and thus the installer no longer requires admin rights under Vista/Windows 7. However, now it seems that it is installing parts in the all users directory and writing registry keys in the local machine section. The ALLUSERS variable is set to false, so I don't understand how that is possible. I think, since I am building a self extracting (web) installer, the InstallAware files needed to run my installer are placed in the all users directory. But what if I don't want that, I don't think it should do that since the ALLUSERS variable is set to false.

Could this problem be overcome somehow with InstallAware 7.5? Or would that only be possible in InstallAware 9? I'll take a look if IA 9 does the same then..
dunion
Posts: 106
Joined: Tue Oct 14, 2008 10:43 am

Re: require Non-Admin Rights

Post by dunion »

If you are installing with no admin rights you won't have any permission to write (for example) to "c:\program files" or other shared areas, only to the users' areas. I believe that's a Vista limitation/design. Same reason you can't write to 'root' (c:\). You can always set the install to require elevation (then the user will have to have someone with rights log in during the install, sort of like joining a domain needing a domain admin login during the process) but won't need admin rights to 'run' the program.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: require Non-Admin Rights

Post by MichaelNesmith »

I think an upgrade to InstallAware 9 makes more sense for you, as InstallAware 9's Run Program As offers a de-elevation check-box which is vital if you want to run a newly installed application in a user context (and not the elevated administrator install context).
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Micha
Posts: 5
Joined: Tue Aug 19, 2008 6:51 am

Re: require Non-Admin Rights

Post by Micha »

Thanks for your responses.

But I don't mean to de-elevate the program I am installing. My program does not require admin rights, it already runs successfully for the current user. I want to install it for that user without the installer requiring admin rights under Vista or Windows 7. Now with IA 7.5 the first problem I had were the manifests, the second is that it complains about not having enough rights to perform the installation for all users. I believe that is because the installer always installs something in the All Users directory and writes to HKLM. Specifically the directory "C:\Documents and Settings\All Users\Application Data\{FCF202A5-FB8A-42DE-8F90-3720C78BEBE4}" and the registry key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MyProgram". It does sounds more like that would be an option in IA, instead of using Run Program As? Pherhaps it is a design of IA7 and it is no longer like that for IA9, but I'd like to know that for sure. So I'm going to try IA9 again and see if that is possible.
Micha
Posts: 5
Joined: Tue Aug 19, 2008 6:51 am

Re: require Non-Admin Rights

Post by Micha »

Hi all, thanks again for your response. I managed to get a per user installation.

At first I tried opening the project I already had with InstallAware 9 and build it with that, so I could see if the installation would also install some files in the All Users directory and write local machine registry keys. It did, so I put InstallAware 7.5 back on and started a new project, and step by step I added the functionality from the old project. I was expecting to find some functionality that would cause this, but I couldn't find it. All the functionality I had in it before is back in and it now installs per-user properly. So I hope this can help a bit, because I don't get it.

Eitherway, I got what I wanted, although I think the feature in IA9 on manual elevation is pretty nice, so I think I'll step over to IA9 soon anyway :).

regards
Post Reply