Israel
Posts: 14
Joined: Mon Dec 17, 2007 2:53 pm

Running an EXE custom action fails on Vista with UAC mode

Hi,

I have an installation that contains a custom action that runs a third party EXE file.
When I run it over Vista with UAC mode enabled, the custom action isn't performed, and the log file reports that there is a problem in the application.

On other operating systems, and on Vista with UAC disabled, the installation succeeded.

Is there a way to solve the problem?


Thanks,

Israel Sadeh
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Please try using the "Deferred with no impersonation" option in the "Execution Options" section of the "Custom Actions" page.
http://www.advancedinstaller.com/user-g ... rties.html

Let me know if the problem persists.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Israel
Posts: 14
Joined: Mon Dec 17, 2007 2:53 pm

Help required regarding running custom actions on VISTA

Hi Cosmin,

Thanks for the reply. :D

I tried "Deferred with no impersonation" but it didn't help.
However when I created a simple test installation, the execution of the exe custom action succeeded.

After reducing and converting my original installation step by step to the simple test installation, I found out that I have to change the location of the temporary exe file that is executed in the custom action. In my original non-working installation the file was located in the application directory (under program files). After moving the file to windows temporary folder the execution of the custom action worked in "no impersonation" mode worked.

Unfortunatly, after all the work I've done I discovered that I can't run the custom action without impersonation, since the executable that runs in the action should sometimes read and write files located on protected network folders for which the user running the installation has permissions, but the SYSTEM user doesn't.

So I'm back to my original question. :?:

I am trying to run a 'console application' exe file in a commit custom action. Everything works OK when UAC is disabled, and fails with error code 1720 when UAC is enabled.

I tried to rebuild the application that is performed in the custom action.
At some time it turned out that removing the resources file (*.rc) from the custom application project, makes a different, and the test installation that was created in that stage ran OK. Unfortunately, for my original and full application it didn't help.

I there anything else I can do to make the custom action work? :? :?
Are there any special guidelines for creating the custom application so it can run under VISTA with UAC?

Thanks in advance,

I really need the help.

Israel Sadeh
Israel
Posts: 14
Joined: Mon Dec 17, 2007 2:53 pm

I solved the problem :) :) :) :)

All I had to do was to rename the file.
The original file name was XmlInstallationReport.exe.
After renaming it to XmlReport.exe it worked with no problems.

The only unresolved issue is why didn't it work with the old name?
Why wasn't I propmted for administrator confirmation for running the application, and instead the running of the custom action failed? :?: :?:
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

I'm not sure why renaming the file worked. Can you reproduce this behavior on other machines?
I found out that I have to change the location of the temporary exe file that is executed in the custom action.
I recommend that you do not use a temporary file for the custom action (it's possible that the file cannot be found when the custom action tries to run). You should use an Installed or Attached custom action.
Why wasn't I propmted for administrator confirmation for running the application, and instead the running of the custom action failed?
Please note that the custom actions which are run during an installation do not prompt for Administrator privileges. If you want to make your custom actions elevated you need to use the "No Impersonation" option.

If the problem reappears, please send us the AIP or a small test case that reproduces the behavior so we can investigate this issue.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”