Skip to content
⌘ NSIS Forum Archive

UAC plug-in EM: install function "ExecAppFile" not referenced

10 posts

kripplet#

UAC plug-in EM: install function "ExecAppFile" not referenced

Hi everyone,

When I try using the UAC plug-in (http://nsis.sourceforge.net/UAC_plug-in) inside a MUI skinned installer, I get following EM:
install function "ExecAppFile" not referenced - zeroing code (1533-1542) out.

I put the dll's and nsh files under the correct locations.
I stated "RequestExecutionLevel user" at the top of my nsi.
I included UAC.nsh.

Anyone has ideas on why this can happen?
MSG#
It's not an error, it's a compiler warning. Apparently there's a function called ExecAppFile that is never called. This function doesn't exist in UAC.nsh, so I doubt it is related to the UAC plugin. The problem is probably in your own code.
kripplet#
If you read the documentation on the UAC plug-in wikipage, then there it says to use this to run an application after the installer has finished:

!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION ExecAppFile

Function ExecAppFile
UAC::Exec '' '"$INSTDIR\${APPFILE}"' '' ''
FunctionEnd

That is why I use "ExecAppFile". It is indeed no function of UAC, but of UMUI.

And you're also correct that it isn't a EM but a warning. But it also says that it is zeroing out the code, which results in an installer which doesn't start up anything after it is finished.
Anders#
this has nothing to do with the uac plugin. Maybe MUI_FINISHPAGE_RUN_FUNCTION is not the correct define for UMUI
kripplet#
Yes, sorry I mentioned it as UAC EM, it indeed is not. I just wanted to add UAC in the title of this topic.

But MUI_FINISHPAGE_RUN_FUNCTION is defined correctly for UMUI. That is, I can find it back in the UMUI.nsh file. And there it looks exact the same as in how it is defined inside MUI.nsh.
kripplet#
Ok guys,

I stopped using the MUI_FINISHPAGE_RUN_FUNCTION and used the function UMUI_CUSTOMFUNCTION_GUIEND instead. This worked. Thanks.

But now I have another question, I assume that this is an UAC issue, or more likely me using the syntax incorrectly. When I try to install a service trough UAC::Exec, nothing happens on Vista, whilest the service gets installed correctly on XP.

This is what I try to use:

UAC::Exec "" "$INSTDIR\Uploadservice.exe -install" "" ""
kripplet#
Sorry to say, but that gives exact the same result. Works in XP, but does nothing in Vista.

I do see that in Vista (and XP as well) during the install a cmd-screen pops up titled "C:\Program Files\uploadservice\Uploadservice.exe" and immediately shuts down again. Is there a way that I can prevent this cmd-screen from shutting down, so I can actually see what it tries to do and maybe the error it is giving?

Thanks for the help.
Anders#
well, first off, are you sure this service can be installed as non admin?

as far as stopping goes, try
UAC::Exec "" "cmd.exe" '/k "$INSTDIR\Uploadservice.exe" -install' ""
kripplet#
No, that just opened up an empty command prompt with no title.

But no problem, I found out that I called the UAC::Exec at a wrong location inside my code, that is why it didn't ran correctly.

So all my issues are gone. My installer works now!

Thanks for all the help Anders.
You made a great plug-in, thanks for that as well!