How do I check if the installed program is running at the beginning of the install4j uninstaller? - install4j

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.

Related

Eclipse Neon.3 fails to launch after install

I've installed Eclipse Neon.3 on my windows 7 machine, after the install process has finished, the installer has an option to 'launch now', which I do and the IDE boots up and works as expected.
However when I close eclipse and then reopen it, I get a crash which prevents it from booting up (sorry for this being a picture, but there doesn't seem to be an easy way to copy the text):
The version I've installed is Release 4.6.3, and the build ID is 20170314. I've installed and removed it 3 times and observed the same behaviour each time. I've tried doing a reset between boots and installs. I've also tried inspecting my environment variables, which look like this:
JAVA_HOME:C:\Program Files\Java\jdk1.8.0_91
PATH: %PATH%;%JAVA_HOME%\jre\bin
Is this a known issue, or do I have something wrong in my setup? Prior to this I discovered 4 versions of the jre/jdk on my machine, and two versions of eclipse. I think I have correctly removed all but the one referenced from my java home, and I entirely removed eclipse and downloaded the latest version (neon.3).
I've fixed the issue, and whilst I'm still not entirely sure why it was a problem, here is how I fixed it.
I opened a terminal and ran 'java -version' (I should have done this first). It was failing to find java.exe, despite the bin folder being on the path. Running this revealed that it was actually calling a shortcut to java.exe found in 'c /programdata/oracle/java/javapath/' which pointed to a now non existent version of java.
So long story short, if you have a similar problem, check if you have shortcuts in the folder 'c /programdata/oracle/java/javapath/java.exe' and ensure they point to the correct program.

VSCode ran once on install, won't run or install again

I'm running this on Windows 7 SP1 with most (if not all) current patches. I have administrative permissions on this machine.
The first time I ran VSCodeSetup.exe, it ran the installer for several minutes then launched the actual application.
I got called into a surprise meeting, so I closed it thinking I'd look at it again later.
However, when I returned to my computer and tried to launch it, I found no evidence that it was actually installed... no desktop icon, no entry in the start menu, no Explorer integration...
I tried running VSCodeSetup.exe again, but all it does it show the installer screen for a split second, which then vanishes.
Since then, I've tried the suggestions outlined in VSCode Installation Failed - Failed to extract installer to install the application, even going so far as to run Update.exe --uninstall followed by running VSCodeSetup.exe again, but nothing has worked.
I even tried disabling my antivirus software and running the installer again, to no avail.
Does anyone know what I can do to get VSCode working again?
According to the comments and answers to Install VSCode in a specific folder, Visual Studio Code installs itself to %LOCALAPPDATA%\Code on Windows.
While I'm not sure why it didn't register itself with Explorer, I can at least create a shortcut to %LOCALAPPDATA%\Code\bin\code.cmd (with icon %LOCALAPPDATA%\Code\app.ico) to get it working again.
Or remove the directory entirely and run VSCodeSetup.exe to install it again, which still doesn't add Explorer integration... but this time at least the PATH now has code in it.
On windows VSCode is installed as Code.exe and its located in your
C:\Users\<windows-user>\AppData\Local\Code\app-<version-number>\Code.exe
or
C:\Users\John\AppData\Local\Code\app-0.5.0\Code.exe

Unable to update PowerGUI Script editor to latest version

OS: Windows 7 Ultimate SP1 x64.
At some point I figured I can no longer update my IDE for Powershell - PowerGUI Script Editor (latest is v3.7.0.92 at the moment of writing). I am getting this error when inside the script editor -> check for updates, as well as in a standalone installation, in both cases the installation is rolled back.
In my Programs and Features I have the following relevant entries:
(A) Quest PowerGUI 3.6 --- Version 3.6.0.21
(B) Quest PowerGUI 3.6 --- Version 3.6.0.8
When I attempt to uninstall (A), I am getting this error:
Although the current version inside the script editor is shown as 3.6.0.21.
And when trying to uninstall (B), I get a standard Modify/Repair/Remove dialog, but when I do Remove, it ends up with the first error again (#1722 above). Doing Repair works, but does not solve the problem, i.e. still unable to Update.
Is there any way I can make it work again?
P.S. One may point out this to be part of superuser, yet I think it's an inherent part of Powershell development and so deserves a place on SO.
It seems the uninstall function either doesn't complete correctly or misses some important registry settings. I had the same problem, and this resolved it for me:
download and run the microsoft uninstall utility
in the utility do the following:
select the install or upgrade software or hardware category.
find and run the fix problems with programs that can't be installed or uninstalled.
give answers to the prompts regarding the powergui instance that will not uninstall.
exit the utility.
install the powergui version of your choice.
get pint from pub

How do I run a windows installer via telnet using the trial version?

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.

Can't run eclipse on netbook MSi wind! HELP

I just got this MSI wind netbook and tried to run eclipse on it. I installed JDK6 on the netbook already. Whenever I open eclipse there is nothing show up on the screen except a "warning sound" that alerts. What is the problem here?
ps.I just started learning java.
Most likely the Eclipse starter program can't find where you installed Java. Since Eclipse is a Java program, it needs a JRE installed (comes with the JDK typically) to run. Assuming you're running Windows on your MSI Wind, check to make sure the java executable is on your path in your computer environment settings (windows key + printscreen button, or windows key + pause button are the shortcuts to open the computer properties dialog if I remember correctly. Then go to advanced).
You can test if java is on the path by opening a cmd.exe shell window and typing 'java'. If it says it cannot find java, then you need to fix the path.
See this link for additional troubleshooting details: http://www.eclipsezone.com/eclipse/forums/t99010.html
You could try reinstalling the JDK. Perhaps having it on a different disk than the default (D: versus C:) is causing some trouble? It certainly isn't a problem with the hardware, I'm running Eclipse on Windows on an MSI Wind.
Use "Add/Remove programs" in the control panel to remove the java versions you have installed.
Then visit "java.com" and use it to install Java, and verify that it is working. You do not need more than that to use Eclipse.