Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 12th July 2009, 13:54   #1
nsnb
Senior Member
 
Join Date: Jul 2008
Posts: 157
Is RequestExecutionLevel a COMPILE-TIME directive?

I tried using RequestExecutionLevel in .onInit but the compiler gave me this error:
Quote:
Error: command RequestExecutionLevel not valid in Function
Does this mean that RequestExecutionLevel is a COMPILE-TIME directive?

If so, what can I do to implement a pretty unique installer that "Requests ExecutionLevel" based on whether the logged in user has Administrator privileges?

I would like to implement this somewhat "smart" installer that changes its behavior based on the account type (i.e. admin vs. limited). Is this possible without resorting to write the installer entirely in win32 C or C++?
nsnb is offline   Reply With Quote
Old 13th July 2009, 00:05   #2
redxii
Senior Member
 
Join Date: Nov 2005
Posts: 113
It creates an embedded XML manifest for Vista and later in the .exe, specifying what privileges are required.

You can look into multiuser.nsh; look in the C:\Program Files\NSIS\Docs\MultiUser folder for usage instructions.
redxii is offline   Reply With Quote
Old 13th July 2009, 14:36   #3
nsnb
Senior Member
 
Join Date: Jul 2008
Posts: 157
redxii, thanks for your answer. I know how to use RequestExecutionLevel and I have been using it successfully in quite a few installers. I just want to confirm my understanding that it is a compile-time directive and that there is no way to tell Vista something like this:
Quote:
"for the full set of features my installer requires Admin privileges but if you happen to run in a limited account you can still run this installer - for a reduced set of features."
Quote:
Originally posted by redxii
It creates an embedded XML manifest for Vista and later in the .exe
So does that mean that RequestExecutionLevel is a COMPILE-TIME directive?


Thanks!
nsnb is offline   Reply With Quote
Old 13th July 2009, 15:18   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,775
yes, it is compile time

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump