cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Azmaeus
Level 6

Test different uninstalls on existing install?

I'm making adjustments to the uninstall, and wondered if I could take a snapshot of the VM after the product is installed, then after uninstalling the product I could revert to the snapshot, replace the uninstaller with a modified one, and uninstall again? This would save me time as I wouldn't need to wait for the install every time.

Labels (1)
0 Kudos
(9) Replies
ch_eng2
Level 6

Yes - this is definitely possible assuming everything you install is on that same VM (ie: not installing a database on a secondary server that would also have to be reverted)

HTH

0 Kudos

Thanks! Do you have information on what I need to know to get started? Do I simply replace the setup.exe and it will extract the updated msi, or do I need to extract the msi myself and put it somewhere for the uninstall to find? I'd prefer the latter, so I can use add/remove programs and have it use the updated msi to uninstall.

0 Kudos

We replace the setup.exe and run that.  I don't have any experience with your .msi-replacement question, but a quick guess is you may need to look in C:\ProgramData\Package Cache\{your_guid?}.version# and replace it there?

0 Kudos

Thanks for the suggestion. I tried this, I installed then made a change to the installer and ran setup.exe again but it didn't give me an uninstall option, instead it treated it as an upgrade. Is that what you get too, then you run it yet again afterwards to get the option to uninstall with the changes to the uninstaller?

0 Kudos
varul
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi,

Is your requirement is to uninstall older version of installer and then new installer right?

If you want to do it with in installshield then you need to create a major upgrade entry which will uninstall older version and then install newer version, for that you need to change the product code of ism file whenever you create a new installer.

Else you need to create a script to uninstall the older version and you need to set it has a task manager task to execute daily, so that it will uninstall automatically. 

0 Kudos

Azmaeus,

Did you keep the version # and Product Code the same?  When we test this scenario, as long as the version # and product codes stay the same, the modified setup.exe will run in Maintenance mode (prompt to repair/modify/remove).  This is for an InstallScript Only project's setup.exe, but I would be surprised if Basic MSI or InstallScript MSI behave differently.

0 Kudos

@varul I'm trying to verify changes I make to the uninstall without having to reinstall each time I need to try something else. Ultimately, I'm trying to get the uninstaller to completely clean-up after the product, but some parts aren't working. I don't need anything updated, only to be able to take a pre-existing installed product, and swap-out the msi for a different one that still uninstalls the same product.

@ch_eng2 Yes the product code and version number are the same. I haven't touched the product code since the project was created, and the version is set with a script that runs IsCmdBld.exe, and also has not changed. To try this out, I've created a new project that only places one file down, and has a custom action set to run during uninstall which is simply 'echo "test" > c:\test.txt'. I didn't use iscmdbld.exe in this test, I ran the build within the InstallShield UI. I then went to the release folder and ran setup.exe. I completed the install, then opened the project and changed the CA to 'echo "test2" > c:\test.txt' and ran the build within the InstallShield UI. I then went to the release folder and ran setup.exe, but instead of running in Maintenance mode, it ran in Update mode, I have a window titled "Test - InstallShield Wizard" and the body "This setup will perform an upgrade of 'Test'. Do you want to continue?"

0 Kudos

@Azmaeus I guess there is some kind of difference, then, between InstallScript Only projects and your project type.  I can follow the instructions you provided and get the desired result (to simplify, I just used MessageBox instead of writing to a file) using an InstallScript Only type.

If you create a new InstallScript Only project type and replace setup.rul with the attached you can see whether or not it does what you expect.  Change the messagebox text in line 158 as desired.

HTH

0 Kudos

@ch_eng2 that makes sense, mine's a Basic MSI. I wonder if I should be creating an InstallScript installer instead...

0 Kudos