Archive: VISTA Compatibility


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'


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


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'


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%.


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'

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.

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

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?

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


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.


- 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.

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


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?)