cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rsacek
Level 2

Delete installer setup files after installation completes.

How do I get the installer to delete all setup files including the JRE after the installation completes?
I have a simple task to deploy files using the installer. Once installed, the installer software must be removed (clients request).
Labels (1)
0 Kudos
(3) Replies
pv7721
Level 20

Well if the client is so lazy that they can't delete the setup that they've just downloaded, I would do a simple trick like this: depending on the platform I would have the installer create a .bat/.sh file in the same folder as the installer was launched (there is a standard IA variable that gives you that folder) and I would launch the .bat/.sh file in which I would attempt the file deletion (probably this is a little trickier on Windows, for which the setup file might be still locked by the OS when the .bat is launched, so you might need a loop in which you attempt deletion and try again if it failed (or simply sleep a couple of seconds, and then try to delete). On the other hand, when it comes to the JRE, the temporary one that is used by the installer, this is normally automatically deleted at the end of the install!
0 Kudos
rsacek
Level 2

Thanks, the scripting approach worked.
You mentioned that the jre should be deleted after the install. I don’t see that happening. After the install on windows I see the “jre” and “temp” folders and a folder with the project name, like _projectName_installation.
I am using the 2010 evaluation version. Is there an option (like a checkbox) in the advanced tool to delete these after the installation completes. This project does not require an uninstall update feature, so keeping the installer folders/jre is not needed.
I ended up creating a script to delete these folders in the post-install cycle. It just seems like an option that should be available.
0 Kudos
pv7721
Level 20

Where exactly do you see those folders you mentioned?
0 Kudos