Archive: Windows 7 - RequestExecutionLevel ?


Windows 7 - RequestExecutionLevel ?
Hi,

another small problem I experienced...
I really don´t get this and maybe someone
out here has an idea what´s going on.

My old installation routine - i call it (1) from now on - (guess it was built with NSIS version < 2) works fine on windows 7...

But my new installation routine - (2) - (same source,
just added a few sections) doesn´t.

Here´s what happens on Windows 7:

(1) UAC Warning,
looks like this
(if url does not appear: img27.imageshack.us/img27/3365/unbenanntmtp.png

-> I click allow -> everything works as expected

(2): Security warning due to unknown publisher
(we know that from Vista and XP) - looks like this (i googled an image, if url does not appear: tweak-uac.com/UAC-unknown-publisher.png)

-> I click "Run" -> Installer works fine but isn´t allowed to create folders or shortcuts

P.S.:
RequestExecutionLevel for both installers is set to:

RequestExecutionLevel user


Thanks for any hint you can provide on why those installation routines work different (I want it the way the old installation routine worked ... without changing user -> admin, or is it impossible without changing it to admin ?)


where are you trying to create the folders/shortcuts? They may be off-limits to writing except for admins (short of an admin messing with permissions).


Folders in
C:\Program Files\[blabla]

and

shortcuts in startmenu and desktop.

The old installer works fine with RequestLevel user !
But the new one doesn´t ... It cannot create folders
or shortcuts in Vista or Windows 7.

Is there something the new version of NSIS changed ?


yes, but did your old installer actually try to write to c:\program files\[blabla]?

If not - there's your problem :) Any installer that wants to write files to the Program Files folder, write to the HKLM registry and several more bits and pieces require administrator rights.


Of course I tried the same folders in "Program Files" but as you can see both installers request different authorization.... very strange.


there was no RequestExecutionLevel in <v2, so what you are saying does not make any sense.


I'll add a few more things:

RequestExecutionLevel was added with 2.21. So even the very first releases of 2.x did not have it.

And are SURE that you have RequestExecutionLevel properly set?

I know Windows Vista has the ability to try to auto-detect if an EXE is an installation or not based on file names, embedded vendor info, and other "signatures". So it's possible you'd get the UAC prompt in some cases in which there was no application manifest.

I did some searching and found this tool that may help you 'peek inside' your EXE to show you any embedded application manifest to allow you to see if it actually has the proper executionlevel set: (http://weblogs.asp.net/kennykerr/arc...-view-1-0.aspx)

I haven't tried it, but I thought I'd mentioned it as a way for you to double-check each of your EXEs to see if they actually have the manifest set properly. (There is another tool in one of the MS SDKs that I've used before that does a similar thing, but unfortunately, I don't remember the name of it off hand...)