We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

shank
Posts: 11
Joined: Fri Jul 15, 2016 3:28 am

Tips with a complicated installer

Hi all,

I have a somewhat 'difficult' program to mass deploy, i will list what is currently required of it, and hoping for some tips for getting it all into an MSI installer.

1. This script does the following;
- kills running processes that the installer handles
- runs an msiexec /x line to uninstall a pre-existing version of the application to be installed
- deletes 3 directories with rmdir
- runs a couple of if exist loops to make sure they were removed, if not it errors out with an error code
- deletes old shortcuts

2. SCCM runs the next DT, which installs an MSI, i repackaged this MSI in advanced installer and it works
3. the final step
- Kill processes again
- copy file to specific folder (the folder is not part of the above installer)
- if exist loops for the above file, if it hasn't copied again errors out with a specific code
- set authenticated users to have full control on the above applications installation root folder
- unzip an archive to a subfolder in the above created installation root directory (needs to be unzipped otherwise it is about 19gb in size)
- copy links to desktop / start menu (these shortcuts are for the application that was just extracted)
- delete the archive file
- error check again if the file is not deleted the script errors out.

Of the above, the only installer package at the moment is the launcher in step 2, the other two are batch scripts.

Is there any way to get the archive to register in add remove once it is extracted? It would make future versions easy to patch if it could remove the old one and replace it with itself.
That would be a bonus, right now just wondering how to get all this as clean as possible into a single installer.

Thoughts?

Thanks
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Tips with a complicated installer

Hi,

In order to have a single installer that will do all the steps you described you can simply add the 1 and 3 scripts one at the beginning and one at the end of the repackaged MSI described at point 2. Also, it is recommended to remove the "msiexec /x" command from the script 1 and uninstall the pre-existing version by adding its Upgrade Code in the "Upgrade" page of the repackaged MSI.

I'm afraid that only installer packages can be registered in the add/remove list, archives cannot be registered there.

Just let me know if you need more details.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shank
Posts: 11
Joined: Fri Jul 15, 2016 3:28 am

Re: Tips with a complicated installer

I have a not yet had a chance to get to this, but i have a similar issue.

I have a program that needs to be uninstalled before the MSI is installed, there is an actual uninstall.exe that requires '/S' to uninstall silently.
This is easily doable via batchfile, is there a way to do this without a script in advanced installer?

I tried via a powershell and using the new custom actions wizard, each time the msi install operation broke
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Tips with a complicated installer

Hi,

In order to uninstall another MSI package during the installation of your product you can go in the Upgrades page, click on the [Upgrade] toolbar button and choose the MSI package that you want to uninstall (or you can write its Upgrade Code manually). In this case that product will be uninstalled before the installation of your main MSI when the "Progress Dialog" is displayed.

If you want to use the "uninstall.exe" file to uninstall that product you can use a "Launch file" custom action, but please make sure that the path you specify for that file is correct.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shank
Posts: 11
Joined: Fri Jul 15, 2016 3:28 am

Re: Tips with a complicated installer

Hi,

Thanks for the response, if the previous installs were not MSI's or even ones i created, i am assuming this option will not work?

What happens if the path does not exist? As there are some computers with a couple of different versions that need to be uninstalled, whereas other PC's do not have them all, if that makes sense?

I have a batch script that does error checking and uninstalling, but would prefer if the MSI could do it all without needing scripts.

Cheers
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Tips with a complicated installer

Hi,
if the previous installs were not MSI's or even ones i created, i am assuming this option will not work?
Even if the previous installs were not MSI packages or if they were not created by you, you can use that option, but they need to be Windows Installer packages and you need to know the Upgrade Code related to them.
What happens if the path does not exist? As there are some computers with a couple of different versions that need to be uninstalled, whereas other PC's do not have them all, if that makes sense?
If that path do not exist an error will be thrown by the "Launch file" custom action and those packages will not be removed. However, you can uncheck the "Fail installation if custom action returns an error" option for that custom action, so that the installation of your package can continue even if that custom action failed.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”