Old 24th October 2011, 19:13   #1
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
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?)
Yathosho is offline   Reply With Quote
Old 24th October 2011, 21:33   #2
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
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...

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 24th October 2011, 21:59   #3
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
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.
Yathosho is offline   Reply With Quote
Old 24th October 2011, 22:26   #4
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Can't reproduce:
http://img62.imageshack.us/img62/6831/uacparameters.png

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 25th October 2011, 18:19   #5
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
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.
Yathosho is offline   Reply With Quote
Old 25th October 2011, 18:31   #6
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
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...

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
cmdline, elevate, parameter, uac

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump