views:

28

answers:

1

I am working with a pure InstallScript installation in InstallShield Pro 2010.

A third-party jar file has been replaced with a newer version in our software. When an upgrade installation is run, the new jar is installed, but the old jar also remains. Bad Things ensue.

How can I get InstallShield to update the contents of a folder, AND delete any other files in that location that are not included in the current version?

I've looked at the Component -> Overwrite options, but this only seems to apply "when the installer encounters an existing file with the same name as the one being installed".

Also, I realize that I could add something to the scripts to remove the offending file, but I need a scalable solution. There will be other files replaced over time, and I'd rather not have to manually add a fix to the installer every time this happens.

A: 

Can you just not change the name of the JAR file from build to build?

I'm not aware of InstallScript having a robocopy /mirror style copy. You'd have to script this behavior and I could see it not ending well quickly.

Christopher Painter
While I expect this would work, it's not very ideal. It would be very annoying to have to remember that we're running activemq 5.4.1, but the jar is still named activemq-all-5.3.1.jar. This also wouldn't work if something were simply removed (rather than replaced with a differently-named version.
sjohnston
Why not just call it activemq.jar? In Win32 world I don't typically have foo1.exe followed by foo2.exe. I just call it foo.exe. To address your second issue, this is why we use Windows Installer and not pure InstallScript projects. Having the ability to declaratively deprecate a component and let the installer automatically handle its removal makes things a lot easier. Writing imperative / procedural script is too fragile and time consuming.
Christopher Painter