Is there a way to force a deleted service handle to be released (Windows 10)? - service

I'm trying to use Windows Installer (MSI/msiexec) to upgrade a product installed by a non-MSI package.
My MSI is using a custom action DLL to exec the other package's uninstaller, then does a "normal" msi install, including installing and starting the service.
The non-MSI uninstaller uninstalls a service but although the service is marked as deleted its handle is held open so my MSI's install of the service is failing. The service handle is not released until msiexec exits. I had hoped/expected that the service handle would be released on exit from the old package's uninstaller, or failing that, on return from my custom action DLL, but until msiexec is finished the service is just marked as deleted.
I have to use the non-MSI package's uninstall mechanism so there's no way to avoid its service-uninstall.
What's the best way to deal with this? If possible I don't want to force the user to do two separate procedures, such as first running the non-MSI uninstall and second installing the MSI. That would no longer seem like an upgrade.
Is there a way to force a deleted service handle to be released?

Related

Installshield - block or run major upgrade from script also for silent mode

Let's say there is installshield project consisting of several releases using the same script. This project builds several installers, for example:
Releases:
App A - builds into AppA.exe installation file
App B - builds into AppB.exe installation file
The project also contains Major upgrade items for each of them:
MajorUpgradeA - triggers for upgrade code of App A
MajorUpgradeB - triggers for upgrade code of App B
Everything works fine if only one of the apps is installed. If user have both of the apps installed then upgrade works incorrectly. With both when user tries to upgrade AppA using AppA installer file, then both AppA and AppB are uninstalled. It should only uninstall AppA, install new version of AppA and ignore AppB when AppA installer is executed.
How to prevent such behaviour, assuming that the project cannot be split to two seperate ones for each of the apps? Doing it in several different ways failed so far:
Triggering silent uninstall from script instead of using Major Upgrade items does not work because there can be only one active msi at a time during execution stage. It could be running in UI stage but then silent install does not work because it ignores the UI execution.
Upgrade components do not have any condition parameters/settings where it would be possible to set it to run such upgrade only if currently running installation has specific product code.

How to handle reboot,shut down during installation of GUI and CLI mode

-How to handle reboot and power off scenarios while installation like how to roll back the installation if reboot and shutdown happens through install4j.
-How to change name of resource folder
As of install4j 8, there is no functionality to perform rollbacks on power-loss or process crashes.

How do you disable storing install directory in Windows Registry for install4j?

Install4J stores a registry entry under HKEY_LOCAL_MACHINE\SOFTWARE\ej-technologies\allinstdirs* in windows when running an installer. Presumably it does something similar on Linux and MAC.
Is there a way to prevent this, and all other other permanent OS parameters, with a command line option? We run integration tests that actually run the installer and run then the application, but this then pollutes our registries, getting in the way of doing manual installations of the same application on our development machines.
As of 6.1, there no way to prevent this. I have added this to our issue tracker.

Install5j issue with concurrency installation of .exe

I had an issue with concurrency installation of 2 applications.
Using install4j5 created two separate .exe files (ONE.exe and TWO.exe.)
After installing ONE.exe (Not running) if I installed TWO.exe, the ONE application is getting uninstalled.
But if I tried to install TOW.exe while ONE is running, it is allowing to install both applications.
Is there any way to make the concurrent install when the other application is not running?

Deploy SqlLocalDB.msi with wix

I want to use SqlLocalDB for my application. The application is deployed with WiX. Now, I am searching a way to install SqlLocalDB when my application is installed for the first time. How can I do that? Would it be enough to deploy some binaries with my application or do I have to install the whole SqlLocalDB.msi? - When installing of the whole msi is needed - how can I do this with WiX? - The goal is, that the result is a single msi-file which holds all what is needed for installing my application.
I'm not aware of a private deployment model for LocalDB. If WiX is your tool of choice, you'll need to use it's Burn bootstrapper feature to install LocalDB as a prerequisite. The result will be a single EXE that installs 2 MSI's.