I have a multi-platform app and install4j creates installers for both Windows and macOS. One of the programs I'm deploying I would like added to the startup folder for Windows ONLY - not MacOS.
Is there a condition expression that I can put in the screen below which will allow the installer to determine if it's running on Windows and only add the launcher to automatically start for that OS and not macOS?
The condition expression you are looking for is
Util.isWindows()
Related
I have a Java program (Eclipse RCP in case that matters) that is installed and uninstalled with install4j. This works fine, except that the uninstaller will happily uninstall (most of) my program while it is running, leading to an incomplete uninstall and a program crash (with potential data loss).
I would like the uninstaller to check whether the program is running before deleting any files, and prompt the user to exit the program if necessary.
I could not find any options to supports this in the install4j documentation or forums.
On stackoverflow I found answers for NSIS and Inno, but not for install4j.
Can this be done with install4j, or do I need custom code? Do I have to make my program react to requests/messages to make it detectable?
You can add a "Check for running processes" action before the "Uninstall files" action.
I'm making multiplatform(win and linux without GUI) installer for my application - using install4j.
Install4j creates application.sh installation file. When I run this sh file - my application is installed on linux machine. But whats the correct way how to uninstall my application? No uninstaller.sh was created. Should I run application.sh with some additions arguments? Thanks
The uninstaller is created wherever you specify it. On Installer->Screens & Actions, select the "Uninstaller" and check its "Executable name" and "Executable directory" properties.
I have a Windows Universal App that needs to be sideloaded. I am using NSIS with a powershell script to install it. I would like to have the NSIS installer enable app sideloading in the Windows settings. I have already looked at the documentation from Microsoft about enabling app sideloading (https://msdn.microsoft.com/library/windows/apps/xaml/dn706236.aspx).
If I run the powershell command from the documentation to set the registry in a standalone powershell window it works fine and I can install the app. However, when I put the registry command inside the installer it doesn't work. I have tried using both Powershell and NSIS to set the registry. Using the WriteRegDWORD command from NSIS and the reg add command from Powershell both say that they succeeded. Reading back the values produces the correct value. If I try to set the registry using Set-ItemProperty in the Powershell script it complains that the path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock doesn't exist.
There doesn't seem to be any way to tell whether sideloading is enabled or not from Powershell. Even outside of the installer context checking the registry is not a valid solution because enabling sideloading via Windows Settings doesn't set the registry.
So my current solution is to try to install the app. If the install fails, check the error message and see if it's complaining about sideloading not being enabled. If that is the case then open up Windows Settings to the developer features page and pop up a message saying that sideloading needs to be enabled in order to continue. Then after Windows Settings is closed reattempt to install the app.
Is it possible to enable sideloading from an NSIS installer? Or is it possible to do a check to see if sideloading is enabled or not?
64-bit versions of Windows have a 64-bit and a 32-bit "version" of the registry, this means that what you see in Regedit might not be the same as what a 32-bit application sees.
Use the SetRegView instruction to change the view used by the installer.
Process Monitor is a useful tool to debug registry issues like this...
I'm evaluating install4j in our company.
We build a win32 installer and we are trying to set up a continuous integration environment to test it.
The CI server is able to upload the installer to the windows target machine (which is a virtualized environment) using FTP, and run batch script that looks like
cd c:\tmp\upload\
my_installer.exe -q -varfile response.varfile -console
Currently we're using the trial version of install4j 5.
When the installer is ran from the command line (cmd.exe over remote desktop) I get a popup window that warns about the trial version.
Installation is frozen until I click ok.
When the installer is ran from telnet the command just hangs and never returns. I believe the reason is that popup window.
To fully evaluate install4j we need to be able see how it fits our CI process.
Is there any workaround for this?
This is a restriction of the evaluation version, with a permanent license key the evaluation dialog will not be shown and the problem will go away.
I'm using Install4J to build my application.
Is there a way to make Install4J copy (make shortcut to) the created application to the autostart directory in windows?
I know there is a installer variable called sys.startupDir, which should point to the autostart directory, I just don't know how to make an action/script that does what I want.
There is an "Add startup executable" action in install4j which does what you want. It even works on Mac OS X as well.