Archive: Get Administrator Previleges on installed exe


Get Administrator Previleges on installed exe
i'm new on this.

i have program that work with registry and i want to run it on startup.

i can create installer that copy my exe and assign my exe to run on startup from registry.
the problem is on windows 7 i need to run as administrator.
if i check the run as administrator option in my exe property and restart my computer, it work fine.
how can i automaticaly check the run as administrator option automaticaly when i run the installer? or may be there is another way to get what i need?


How to search in three easy steps:
1) Click Search at the top
2) Enter keyword, then select NSIS forum only, and 'show results as threads'
3) Click Search now.

Searching for 'run as admin checkbox' I found several threads that talk about this. Particularly http://forums.winamp.com/showthread.php?t=308395 mentions the use of a registry setting.


Setting that registry key is not really the best solution, for alternatives check:

http://nsis.sourceforge.net/IShellLink_Set_RunAs_flag
http://nsis.sourceforge.net/ShellLink_plug-in
http://forums.winamp.com/showthread.php?t=319628