Install Shield custom action will not run as admin

Don VonderBurg
Don VonderBurg used Ask the Experts™
on
OK experts here's an InstallShield puzzle. I think recent Windows 10 updates are affecting this, but I am not sure. We have an application that installs to "Program files (x86)" folder. Our customers have been installing our application for years with no issues. Included in the install is a custom .exe application (written in c# .net) that performs a few registry read/writes to the HKCU tree created by us. Recently the exe included in this custom action has been failing to perform a simple read of the registry tree. But after the installation is finished we can right click the custom action exe that is included, run as admin, and it will perform all functions without fail. We are using InstallShield 2016 Express version. The application is written in c# .Net using Visual Studio 2017 Pro. All applications are code signed including the custom exe.  We have "Deferred execution in System Context" setting for the In-Script Execution settings for the custom action. The custom action is located in the "After register Product" section. What am I missing?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Let's look into the detailed log file that you will upload. Was custom action even called?

If it was, what happens if your application has failed to do its thing? will it indicate some error, or will quietly ignore it?
Don VonderBurgPresident/CEO

Author

Commented:
Thank you Vadim for the attention. The custom action exe has a form that is displayed while performing it's many actions. So we see it open and run when it comes to that section of the installer setup.exe. The setup.exe is running as an admin. The custom exe is stored and saved in the programs folder in case we need to use it for support, and is launched by the custom action from that location. If we right click on it and run as admin everything works perfectly. That indicates to us that the installer is not launching it with admin. This has worked in the past with no issues. We are suspecting a Windows 10 update has messed with some security settings we need to address.
You can verify if it runs elevated by invoking Task manager -> Details, and making the column "Elevated" visible.          

Plus, again, detailed log file would help.
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

Don VonderBurgPresident/CEO

Author

Commented:
OK Vadim this is the kind of stuff that drives me nuts.

It is working now but not sure why. Here is what I did.

1. I moved the custom action from "After register product" to "After setup complete success dialog". Tried it and it failed.
2. Moved it back to "After register product"
3. Turned on logging to get you a log.

And it worked after I built an install setup.exe. So wondering what fixed it I turned the loggin back off and tried it again. And it still works. Now I cannot get it to fail. Maybe the move down then up? Anyways thank you for the input.
Simple: it felt EE around the corner:)

More seriously, you probably tried it on “dirty” machine. The best is to try on virtual machine that was just reset to the initial snapshot taken right after windows installation. Machine that already saw multiple installations/ uninstallations, some of them defective in the course of development, can sometimes exhibit mysterious and inexplicable behaviors.
Don VonderBurgPresident/CEO

Author

Commented:
Thank you Vadim for getting my thoughts together and giving some input.
You may already know, but custom action with its own UI is considered a very bad idea, primarily because it precludes silent installation, so the package can't be assigned to the machine, run remotely by admin's command line, etc. Any interaction with the user should be on customized Installer's dialogs. More details here

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial