Old 23rd April 2009, 06:32   #1
bedbuffer
Junior Member
 
Join Date: Apr 2009
Posts: 33
Is it possible to silently run an NSIS installer in VISTA?

I made an updater which silently runs in XP and works just fine. But when it comes to Vista, the idea of silent installation gets ruined when UAC prompts the user to cancel or allow the user from running the program.

Is there anything at all we can do about this?

Thanks...
bedbuffer is offline   Reply With Quote
Old 23rd April 2009, 09:22   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
if you don't require admin rights, just use RequestExecutionLevel user, if you DO, there is nothing you can do about it other than starting the installer from a already elevated parent process (batchfile etc)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 24th April 2009, 03:01   #3
bedbuffer
Junior Member
 
Join Date: Apr 2009
Posts: 33
I used "RequestExecutionLevel user"... it does the trick for user level. But for admin, UAC prompt still comes out...
bedbuffer is offline   Reply With Quote
Old 24th April 2009, 03:13   #4
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
That's how UAC is supposed to work.

The only way to suppress the prompt with UAC enabled is to have an application manifest set to run as a normal user (RequestExecutionLevel user)
Comperio is offline   Reply With Quote
Old 24th April 2009, 04:02   #5
AaronLS
Senior Member
 
Join Date: Mar 2008
Posts: 129
Quote:
Originally posted by Anders
if you don't require admin rights, just use RequestExecutionLevel user, if you DO, there is nothing you can do about it other than starting the installer from a already elevated parent process (batchfile etc)
Would it be possible to have an "updater" windows service running at admin rights which downloads and runs the update?

Just a side note on batch files in Vista. I've found you have to right click them and choose "Run as admin...". If you just double click them, and they try to do something that requires admin rights, then they will often simply fail silently with a "permission denied" or a similar error(which you won't see when the console window flashes up breifly), rather than prompt for UAC.
AaronLS is offline   Reply With Quote
Old 24th April 2009, 08:12   #6
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
yes, it would be possible, but the service would require a UAC prompt during install (but, please, don't fill your end users systems with useless services)

Look at firefox, it will show a UAC dialog when you apply updates.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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