Skip to content
⌘ NSIS Forum Archive

Administrator password needed

8 posts

gberes#

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
gberes#
Plus, if i install from administrator account, i need my application shortcut to appear in all the users start menu.
Afrow UK#
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
Yathosho#
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!
gberes#
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?
Afrow UK#
You could install to the application data folder as some applications tend to (like Microsoft SyncToy for example).

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

How can i do that?