Archive: UAC with parameters


UAC with parameters
with 900 search results, i'm going to risk a double post. it seems like an installer elevated using the uac plugin will not be executed with commandline parameters. what am i doing wrong or is it not possible to do that (how is something not possible in nsis?)


Huh? In my experience the UAC plug-in will forward all CLI parameters that have been passed to the "outer" instance to the "inner" one. But it will add its own parameter (/UAC:xxxxx and /NCRC), of course. You can easily check that with ProcessExplorer...


it kinda surprised me because i don't recall having had any problems in the past, but maybe i didn't test thoroughly enough. i also downgraded from 2.46.3 to the official build, with no change.

i checked in the windows 7 task manager which also shows the commandline parameters. they're only in the outer instance. mmmh.


Can't reproduce:
http://img62.imageshack.us/img62/6831/uacparameters.png


ok, the problem is this. as the uac plugin elevates the installer, the elevated instance will be excuted with additional parameters in the commandline (e.g. /MyParameter -> /UAC:111296 /NCRC /MyParameter)

as i was using a simple commandline switch (/MyParameter), i could not get this using GetParameters. GetOptions on the other hand still works fine, i just didn't use it before.

oddly enough, neither processexplorer nor the windows 7 task manager ever displayed the commandline parameters for the elevated process. i had to use a messagebox to find my out the above.


Taskmanager or ProcessExplorer cannot access the command-line (and other internals) of elevated processes. In ProcessExplorer you use "File" -> "Show Details for All Processes" to elevated ProcessExplorer itself and get the full info...