Prepare Install Command, Unisntall Command and Product Code
Create Application
Prepare Install Command, Unisntall Command and Product Code
I’ll deploy a jre exe application.
For any exe applications, we need to have 3 things:
-
Install command: Unlike msi file, exe’s install command is uncertain. For the jre exe, I need to go to the java website to check what is the install command.
-
Uninstall command
-
Detection method
Found Java install command here: https://www.java.com/en/download/help/silent_install.html
Test the command installation first:
So the install command line is:
jre-8u301-windows-i586.exe /s
Uninstall command:
For uninstall command, we need to get the uninstall string. To obtain the uninstall string of any application from the registry:
-
Open the registry
-
Browse:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
This is the location where all the 64 bit application registers itself in registry. You will need to find the required application in the list. -
In the right hand pane select either 'uninstallstring' or 'quietuninstallstring' and copy the contents of the 'Value Data' feild.
I right clicked Uninstall and searched “java”, nothing helpful showed. After some searching on java website, I found this article:
https://www.java.com/en/download/help/regkey_addremove.html
So I searched “Java 8” with capitalized “J” and this time I found the uninstall string. Later on I tried “Java” and could also find it. It’s in this location:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\
Copy its value data:
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180301F0}
For its uninstall command, we need to put a space after “/X” and add “ /q” at the end of the string, which means “uninstall silently”. Note that there’s also a space for it; so it’d be like:
MsiExec.exe /X {26A24AE4-039D-4CA4-87B4-2F32180301F0} /q
Test the uninstallation first:
Detection method is the product code of the application, that is:
{26A24AE4-039D-4CA4-87B4-2F32180301F0}
In a short summary:
-
Install command: jre-8u301-windows-i586.exe /s
-
Uninstall command: MsiExec.exe /X {26A24AE4-039D-4CA4-87B4-2F32180301F0} /q
-
Detection method: {26A24AE4-039D-4CA4-87B4-2F32180301F0}
Create Application
Now let’s create application.
And then just distribute and deploy it.