- NSIS Discussion
- Invalid command: UAC::RunElevated
Archive: Invalid command: UAC::RunElevated
pbeisel
6th April 2011 00:36 UTC
Invalid command: UAC::RunElevated
when i compile my script i get:
Invalid command: UAC::RunElevated
UAC.dll is in my plugin's directory, but i am not sure its it loading properly:
in the installer output i see:
Processing plugin dlls
many individual lines are listed
e.g.
BgImage::Clear
BgImage::Sound
but for UAC I have:
UAC::_
does UAC::_ mean its collecting all functions or does this indicate a problem?
pbeisel
6th April 2011 01:13 UTC
assuming UAC::_ is not indicating a problem ...
i also verified that UAC.nsh is loaded correctly
(tried the .dll from the current branch as well as experimental, tried both the "A" and "U" versions... same result)
pbeisel
6th April 2011 01:55 UTC
well i got it to compile by changing:
UAC::RunEvevated
with
!insertmacro UAC_RunElevated
is this correct?
Anders
6th April 2011 04:48 UTC
Yeah, the export name changed, and yes, use the macro from now on...
pbeisel
7th April 2011 01:39 UTC
UAC::ExecCodeSegment
same problem for UAC::ExecCodeSegment?
is there a macro i should use in its place?
Anders
7th April 2011 01:51 UTC
Yes, all exports have been renamed to _. UAC_AsUser_Call is the basic replacement macro (With more specific versions like UAC_AsUser_ExecShell)
pbeisel
7th April 2011 02:16 UTC
I'm sorry I don't understand:
what specifically do I substitute for UAC::ExecCodeSegment as in the code example:
GetFunctionAddress $0 CreateShortcuts
UAC::ExecCodeSegment $0
MSG
7th April 2011 06:00 UTC
You cannot call UAC::Whatever directly anymore. You have to use the macros in UAC.nsh. For the case of ExecCodeSegment, you'll probably need something like
!insertmacro UAC_AsUser_Call function YourFunc ${UAC_SYNCREGISTERS}|${UAC_SYNCINSTDIR}
pbeisel
7th April 2011 06:31 UTC
so I assume you mean:
!insertmacro UAC_AsUser_Call ExecCodeSegment CreateShortcuts ${UAC_SYNCREGISTERS}|${UAC_SYNCINSTDIR}
so with that i get:
!insertmacro: UAC_AsUser_Call
Push: $0
Invalid command: GetExecCodeSegmentAddress
Error in macro UAC_AsUser_Call on macroline 2
MSG
7th April 2011 06:45 UTC
I cannot find 'GetExecCodeSegmentAddress' in any of the recent UAC.nsh versions. You're probably using an out-of-date version.
pbeisel
7th April 2011 06:47 UTC
ok i think you meant literally:
!insertmacro UAC_AsUser_Call function CreateShortcuts ${UAC_SYNCREGISTERS}|${UAC_SYNCINSTDIR}
correct?
if so, what does:
${UAC_SYNCREGISTERS}|${UAC_SYNCINSTDIR}
mean?
could someone update http://nsis.sourceforge.net/UAC_plug-in so the examples map to the current code reality?
thanks.
pbeisel
7th April 2011 06:50 UTC
i am using uac.dll and UAC.nsh
in version UAC_v0.2.2d.zip
MSG
7th April 2011 06:52 UTC
Syncregisters and syncinstdir do exactly what they sound like: they synchronize the registers (registers are the NSIS standard variables $0, $1, etc) and the instdir variable. And if you're wondering 'Synchronize between what?', I would suggest you stop trying to use the UAC plugin...
As for code examples, there are several nsi example files in the zip.