Archive: How Can I make show up UAC with ExecWait?


How Can I make show up UAC with ExecWait?
My setup needs administrator rights to be executed.
In my setup I need to launch many .exe files showing the request Yes or No from UAC. Not necessarily with the request of admin username and password.
I saw the UAC plugin but it should be only ansi and I'm using unicode nsis.
I want to make sure that the UAC request if you want really execute that file for every file that needs admin rights that I execute.

mmm ok I think that's all.
Sorry again for my bad english :(
Waiting for your reply
Bennaloz


If your installer is running at admin level, all child processes will also be running at admin level. If you want a yes/no popup, you can simply use the MessageBox command before you execwait.


I saw it. When I say yes the first time uac won't ask me again. So Isn't it possible to make the uac asks for execution confirm of a child process?


No, not for an admin-level child process. You are correct that it is possible if you execute them at userlevel using the UAC plugin or the ShellExecAsUser plugin.

..but seriously, why on earth would you want to bother your clients with loads of UAC popups? The whole point of UAC is that once it's elevated you don't need to worry anymore. If I let an installer get admin level, I don't want it to keep asking me whether I'm really sure I want to give it admin access...

In my opinion, your idea will only confuse the users. They don't expect new UAC popups from your installer, so they might think that some other application (virus?) is suddenly popping up and demanding admin access.


No ok..."Problem changed"
Ok no I'm sorry misunderstood what the problem was. I'am executing the main setup with RequestExecutionLevel user and I need to exec some setups that required admin rights from it. Now those setups don't start. I have to be able to run as user some others setups with admin rights request. Nsis runAs admin plugin I don't think is what I need because for that I need to know login data and I don't know them. Anyway I didn't found any docs about it. So I need to be able to launch executable with admin rights request from a user environment.
How to do it?
I need something like
RequestExecutionLevel user
ExecWait '"myapp.exe" runAsAdmin <parameters>' $0 ;myapp can be executed only by admins

Sorry for the wrong thread title and for the wrong explanation of the problem but really I didn't understood what I needed

Edit: I should be able to do something as admin from a user account. (Write reg key, install files etc)


Why is your main installer "RequestExecutionLevel user"?


Just trying if it's possible do the installation from a simple user. But it's hard. I don't understand how runAs works. And a user can't do so much. I am looking for a way to do the same things maybe without asking login data. If it's possible... or maximum asking them once.


You already said you need to elevate child process and you should only elevate once so why not just use requestexecutionlevel admin?


Aaah... I want to be able to launch installers with admin rights request from a user level installer...


If you want to install your app at userlevel, and you need to install additional apps at admin level, either create two installers or use the UAC plugin or ShellExecAsUser plugin.


Originally posted by bennaloz
Aaah... I want to be able to launch installers with admin rights request from a user level installer...
This does not answer my question! Why does the main installer have to stay at user level?

Originally posted by MSG
If you want to install your app at userlevel, and you need to install additional apps at admin level, either create two installers or use the UAC plugin or ShellExecAsUser plugin.
I already saw UAC plugin but the unicode dll miss in the zip. And ShellExecAsUser I will try it I already saw it but I think it doesn't wait and I need that wait for the end of the process. And anyway seems to miss also here the unicode plugin.

@Anders...
Just testing the potential of nsis at the end. Why? If I can ask you this.

Done. I found out a version of ExecShell with waiting for the end of the proc in http://nsis.sourceforge.net/StdUtils_plug-in that can launch installers at admin level from an installer with user level.
In this way having the main installer with RequestExecutionLevel user I can launch flash player prerequisite showing UAC request only for that process -.-''. I wanted to run my installer without UAC request but if I need installing prerequisites showing UAC request for their launch.