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

-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.

Related

VisualVM is stopped by Cylance protect antivirus

By enterprise policy, we have to run Cylance protect antivirus on our workstations. It cannot be suspended or uninstalled.
I can start VisualVM, but when I try to connect to a process, a message is displayed by Cylance protect that the process of VisualVM was stopped because it was "recognized as a threat".
Edit: I see VisualVM's start page where the Java processes, including VisualVM and Eclipse, are displayed. As soon as I select a process and try any action (monitor, profile, etc.) Cylance pops up and hard terminates VisualVM. The Java processes keep running.
The tech team thinks this comes from VisualVM trying to access another process' memory.
My system: Java 11, Eclipse 2022-12, Windows 11.
We tested for a short time with Cylance disabled and then the profiling worked.
(I needed some time to talk my tech team into that so this does not seem to be a practicable solution.)
I don't expect this to change with the Java or Eclipse version. Was already the same with Java 8 and / or elder Eclipse versions.
Has anybody the same constellation and knows how to configure a rule in Cylance that profiling with VisualVM is possible?

Change (rather than Uninstall) an Install4j application

What I believe to be a common occurrence is for Install4j to be used to generate both an installer as well as an uninstaller. From what I've seen, the installer can be used to reinstall/reconfigure the installed application.
On Microsoft Windows, the uninstaller gets registered under the Programs and Features > Uninstall or change a program item in the Control Panel. Is it possible for that uninstaller to be used to 'change' the installed application, rather than uninstall it? For some users of Windows, this might seem more natural than running the installer again, I suspect.
As of 10.0, install4j does not offer such a feature. You can add additional installer applications to run additional actions, but the "Install files" action can only be run in the installer.

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

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?

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.

Setup project slow to install Windows service and client

I am currently using the Visual Studio 2010 Setup Project to deploy my application to an MSI installer file, which includes a Windows Service and a Windows Forms application. But I am disappointed with the performance and compatibility of this form of packaging.
My application is compatible with Windows XP and upwards, but several older XP user-testing boxes simply don't have the right version of the Windows Installer or the necessary service pack installed. (Un)installation can take dreadfully long for a program under 1MB in size and many systems do not support it. InstallState errors can crop up and ruin the (un)installation if the service has been deleted or already installed, or if any program files are missing (for uninstall).
What I need from an (un)installer:
Manage .NET dependencies.
Copy/remove my application files to a folder.
Add/remove menu and shortcuts to the desktop and Start menu.
(Un)install a Windows service, though I can also do this from my application. The stop and uninstall part is important.
Run my application when it's done.
This question's answers recommend NSIS (which I have used with good results) and WiX. Ironically there is no easy link to simple installer for WiX on their website.
Am I missing something with VS2010's setup project? It is optimized for speed, but it's just too slow.
You should run the installer/uninstaller explicitly with
msiexec /x thefile.msi /l*v thefile.log
(/i for install). Then inspect the log file; it will have time stamps telling you what action took what amount of time. Of course, the logging will affect that, but you should get an idea what makes it take so long.