Archive: Administrator password needed


Administrator password needed
Hi!

When i start installing my NSIS package, from a simple user account, windows ask for the administrator password. This is not the intended behavour for my projekt. Why is this, and how can i overcome it?

Thanks


Plus, if i install from administrator account, i need my application shortcut to appear in all the users start menu.


If this is on Vista, use RequestExecutionLevel user.
Use SetShellVarContext all before creating your shortcut to place it in the all users profile folder.

Stu


1. RequestExecutionLevel
2. SetShellVarContext

btw if you don't know nsis, the example directory is a good way to start, followed by the Scripting Reference and the Wiki!


Thanks for the info. Is this solution works with xp?


I added "RequestExecutionLevel user" line. Now i getting the following message:

Error opening file for writing:
C:\Program Files\AppName\myjar.jar

Maybe because user cannot write to protected dirs, such as program files. Should i install to user documents dir?


You could install to the application data folder as some applications tend to (like Microsoft SyncToy for example).

Stu


SetShellVarContext works fine, but i also want to remove all the shortcuts on uninstall, wich is not happening now.

How can i do that?