We are using Install4j v6.16.
In our uninstaller process we define "Delete files or directories" action to the installation directory by: ${installer:sys.installationDir} with the recursive option.
After the process is getting finish the .install4j directory (which contains some jars files and 1 dll file) and the uninstall.exe file won't be deleted.
If some of these files weren't be able to be deleted, the uninstaller process should have throw an error, isn't it?
On Windows, it's not possible to delete a file that is in use, so the uninstaller does this with a temporary executable in the %TEMP% directory.
The "Delete files and directories" action does not throw an error if a file cannot be deleted, it writes file paths that cannot be deleted to the log file of the uninstaller in the %TEMP% directory.
Use the "Delete files and directories" action only for specific files that are created by your application in addition to the installed files, the runtime files will be deleted automatically.
Related
the InstallFiles action is a location in temp files, during the installation i changed the ${installer:sys.installationDir} . But Install4j will copy the files.log in the temp location where the installFiles action copied the files.
why? where is my mistake?
How can I upgrade my application with install4j of previously installed application which was build with non-install4j.
There is no direct support for that in install4j, but before the "Install files" action, you can copy files that should be preserved from the old installation directory to a temporary directory. Then you delete the old installation directory with a "Delete files or directories" action.
After the "Install files" action you use the "Move files or directories" action to move the preserved files back to the new installation.
Today I need a solution to avoid creating a installation directory by install4j version 6.1.3 in a context of a patch installation. I wrote an installer which contains some files to install them to an existing application installation. The files should be bundled together with the patch installer. At the install files action i deactivated the install runtime selection point but the installer still created the installation directory containing a folder called .install4j. In this folder there are only some install4j files. When I deactivate the whole install files action the folder will not be created but the bundles files will also be not extracted to the temp-dircetory, right? I also marked the installation directory as an excluded file at the media-wizard. Do I missed something?
Thanks in advance
I would recommend to use the "Add-on installer" installer type on the "Installer->Update options" step.
If you need to update the version number, an alternative solution would be to remove the "Install files" action and add a ZIP file files.zip on the "Installer->Custom Code & resources" step that contains the new files. In the "Installation" screen, add an "Install content of a ZIP file" action with the "Zip file" property set to ${installer:sys.resourceDir}/files.zip.
How can I rename file in install4j?
I have a step to choose the file by user, and if user uploads the file with different name then x.txt i need to rename it back with some post action back to x.txt
I see that install4j has option to Move files and directories, but I see only the destination as a folder, not a file name.
I see only one way how to do it by creating "Run script" post action and write code in Java to actually rename the file.
Is any other standard options in Install4j to do it?
If the "Source files or directories" property of the "Move files and directories" action is set to a single file, the "Destination directory" property can be a file name as well and then the action will rename the file.
i am generating an installer for a desktop application using install4j 4.0.5 compiled by
j2re1.4.2_08 and running on WindowsXP.The Problem is that The uninstaller does not delete any files unless the files that have been installed by a previous installer.
Example : It install my application into program files folder lets say
"Vodafone". My application further creates some files and folder into "vodafone"
folder. At the time of uninstall it delete every thing whatever create
by setup while files and folder created by my application remains
there in "vodafone" even after restart my machine several time so i need to delete all files inside the installation folder .
I need your support to know how to fix this problem and if there is any workaround i can do to solve this issue.
The uninstaller does not delete all files and folders in the installation folder. Only the following files will be deleted:
Files that are contained in the installer and have an uninstallation policy that leads to uninstallation, such as "Always" or "If created".
Files that were registered with context.registerUninstallFile(...) by the installer
If the installation directory is empty after those files have been deleted, the installation directory will be deleted as well.
If you want to delete other externally created files, use the "Delete files or directories" action instead.