Spilly
2nd July 2008 17:54 UTC
Install without triggering UAC?
Hey guys,
I'm guessing the answer is no, but is it possible to install a file in Vista, without triggering the UAC, if ran by an application that has already been given permission through the UAC?
For instance, App1 triggers an event which requires an install of a certain library, which should be invisible to the user. It's downloaded and installed in the background, with the user notified that they are ready to use the feature they want.
If there's a solution outside of NSIS you can point me to, that might work as well.
Thanks!
Comperio
2nd July 2008 21:29 UTC
hmm...
Seems that RequestExecutionLevel should maybe offer a choice of "asInvoker". You might want to submit a feature request for this.
The only other way I would know how would be to somehow edit the embedded manifest of the compiled installation. Unfortunately, I have not been able to come up with any tool that helps you do that.
(Or, if your EXE doesn't require admin, then you could set ReqestExecutionLevel to "user". (Or you could use "highest", but that would still trigger the UAC prompt if the user were part of the admin group.)
pengyou
2nd July 2008 21:55 UTC
Seems that RequestExecutionLevel should maybe offer a choice of "asInvoker". You might want to submit a feature request for this.
There is no need for a feature request:
"RequestExecutionLevel user" actually inserts "asInvoker" in the manifest.
Comperio
2nd July 2008 22:54 UTC
ahh... Clever... That's good info, pengyou!
(This fact should be documented, but I didn't see it. Alas, that's probably another topic...)
@Spilly:
After I thought about your first post, I came up with some other points:
- I assume you when you say you have already given permission, you mean that have been elevated to admin correct? If so, then whatever you launch with said application should inherit the permissions. (At least that's what I understand of how UAC works.)
- An exception to the above statement might be that if said application has it's own manifest that starts as a normal user and then tries to do some type of admin process, then it may try to prompt again for permission. In that case, the only thing I can think of is to contact the author of said application to fix their code. (or there might be a tool out there that lets you "hack" the embedded manifest.)
- If the said application is one created with NSIS, then just add RequestExecutionLevel user to force it to use asInvoker (which should guarantee the behavior you desire.)
Hopefully, I made that clear as mud... ;)