Old 1st May 2008, 08:24   #1
ecaste
Junior Member
 
Join Date: May 2008
Posts: 4
Angry VISTA Compatibility

Dears,
I'm facing to a **** problem since I've tested the installation of my script on VISTA with a non administrator account:
the installation is perfect but as soon as the user wants to execute my installed program, VISTA is asking for account elevation.
It seems that the user needs to be an administrator to run my application.

I've tested several things, with no success:
- When I'm using RequestExecutionLevel user: the installer can't copy files in PROGRAM FILES

- And unfortunatly, when I'm using RequestExecutionLevel admin: the user needs to be admin to execute the program.

- When I'm combined both, RequestExecutionLevel user with the UAC_Plugin: the user still needs to be admin to execute the program.

Today I'm totally stuck, does anybody can help me ?

Thanks by advance.

Man'
ecaste is offline   Reply With Quote
Old 1st May 2008, 09:10   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 3,464
you can't have it both ways, if you want to put files in $programfiles, you need to be admin. If you want a non admin installer, put the files in $localappdata or something like that

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 1st May 2008, 09:16   #3
ecaste
Junior Member
 
Join Date: May 2008
Posts: 4
Hi Anders,
thanks for you reply, but how can I install my application in Pgrm Files AND let a standard user execute my application (without elevation to admin account) ? Is that possible ?

Thanks.
Man'
ecaste is offline   Reply With Quote
Old 1st May 2008, 09:18   #4
LordDaimos
Junior Member
 
Join Date: Apr 2008
Location: Vännäs, Sweden
Posts: 8
Send a message via ICQ to LordDaimos
Standard users can execute in Program Files but you can't have your application writing files (such as settings) there. For that there is %appdata%.
LordDaimos is offline   Reply With Quote
Old 1st May 2008, 09:25   #5
ecaste
Junior Member
 
Join Date: May 2008
Posts: 4
Quote:
Originally posted by LordDaimos
Standard users can execute in Program Files but you can't have your application writing files (such as settings) there. For that there is %appdata%.
That's my point, I'm totally agree with you in theorie...

Before NSIS, I was using standard MSI installer to install my application in Program Files directory, and all was working fine:
- installation: ok
- running the application as a standard user: ok

But I wanted to move from that MSI installer, and started to learn about nsis, which is perfect for our usage.

But now, I'm facing on the pb described, problem I didn't have before with the msi installer....:
Why should Vista asks everytime for elevation on admin account when I'm trying to run my application...?

Is it in my application level (strange...) or is it due to my installation procedure...

Anyway, thanks for help

Man'
ecaste is offline   Reply With Quote
Old 1st May 2008, 20:11   #6
NEHOG
Junior Member
 
Join Date: Oct 2006
Location: New Hampshire
Posts: 33
Quote:
Originally posted by ecaste
Is it in my application level (strange...) or is it due to my installation procedure...

Anyway, thanks for help

Man' [/B]
I think you will find that your application's manifest is marked 'requireAdministrator' which is why the user is being prompted. Set the manifest to 'asInvoker' and that problem may go away.
NEHOG is offline   Reply With Quote
Old 1st May 2008, 20:28   #7
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 3,464
Quote:
Originally posted by NEHOG
I think you will find that your application's manifest is marked 'requireAdministrator' which is why the user is being prompted. Set the manifest to 'asInvoker' and that problem may go away.
asInvoker is NEVER the right thing to use, either use admin or user

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 1st May 2008, 20:42   #8
NEHOG
Junior Member
 
Join Date: Oct 2006
Location: New Hampshire
Posts: 33
Quote:
Originally posted by Anders
asInvoker is NEVER the right thing to use, either use admin or user
Oh? And what is the right thing to use for a non-administrator program?
NEHOG is offline   Reply With Quote
Old 2nd May 2008, 06:29   #9
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 3,464
sorry, I messed up (the MS names vs. the nsis names for this stuff always confuses me)

for a non admin app, you want user aka asInvoker, and never highest aka highestAvailable

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 5th May 2008, 12:53   #10
ecaste
Junior Member
 
Join Date: May 2008
Posts: 4
Unhappy

Hi,
Thanks guys for your inputs...but unfortunatly I have still my pb: when installed in $PROGRAMFILES using NSIS, myApp.exe has a shield on its icon, and I need to launch it with admmin account!

I've set the manifest of my application using asInvoker...with no success, but:
- if I change the installation repository, for ex. in $APPDATA instead of $PROGRAMFILES, I can set with success the security in the manifest file (either requireAdministrator, or asInvoker).
- if I copy manually all needed files in $PROGRAMFILES, I can then run with my standard user account myApp.exe.

Any idea?

Because I can of course put all my files in $APPDATA, but it seems that the recommended location for executable files is in $PROGRAMFILES...

Thanks.
Manu.
ecaste is offline   Reply With Quote
Old 6th May 2008, 08:09   #11
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,894
Quote:
- When I'm using RequestExecutionLevel user: the installer can't copy files in PROGRAM FILES
It looks like you're forgetting ${UAC.I.Elevate.AdminOnly} . Use it, in combination with RequestExecutionLevel user, in .onInit to have Vista ask for the Admin password during install AND run the installed application as a user.

Hmm... At least, I *think* it runs it as a user in that case... Anders would know, he designed the plugin. Anyway, I don't think this solves the problem of Vista thinking the application needs Admin priviledges, but I just thought I'd mention it.
MSG is offline   Reply With Quote
Old 6th May 2008, 10:27   #12
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 3,464
I think we are confusing installer and programs here. If your application has a manifest with asInvoker, if you still have problems, maybe you don't have execute rights or something in $programfiles, try using the AccessControl plugin

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 7th May 2008, 01:10   #13
NEHOG
Junior Member
 
Join Date: Oct 2006
Location: New Hampshire
Posts: 33
Quote:
Originally posted by ecaste
Hi,
Thanks guys for your inputs...but unfortunatly I have still my pb: when installed in $PROGRAMFILES using NSIS, myApp.exe has a shield on its icon, and I need to launch it with admmin account!
In this case either your program has a bad name (the name of the executable has either 'setup' or 'install' in it) or your application has a manifest that indicates that administrator privileges are required.

You can post your manifest file and we can look at that and maybe see the problem...

IMHO, this has nothing to do with NSIS or installation, but is what your application is configured to do by the building platform. (.NET by chance?)
NEHOG 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