cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ratnam
Pilgrim

Tool to uninstall corrupted installations

Hello,

We had a windows installer made using Installshield 2013 for our product, we face issues during product uninstall when the installation is corrupted, so we would like to make a tool for uninstalling those corrupted installations. Can anyone please help us on how to do it. Thanks in advance.

Thanks & regards,
Ratnam
Labels (1)
0 Kudos
3 Replies
hidenori
Pilgrim

Re: Tool to uninstall corrupted installations

Have you tried Microsoft KB 290301?
0 Kudos
Ratnam
Pilgrim

need to do it with InstallShield only

Hello Hidenori,

Thanks for your prompt reply. Our requirement is to make a tool using InstallShield so that we can remove all the files,folders,registry values and dlls which our installer placed earlier during installation, when trying to do so, we see our tool recognized as an update and it prompts for an update and once the update is done if we run the tool again then its working fine. Can you please help us on how to avoid upgrade and start uninstalling it at the first time.

Thanks & regards,
Ratnam
0 Kudos
sdnelson
Pilgrim

Re: Tool to uninstall corrupted installations

Major upgrades don't give an upgrade prompt like minor upgrades do but you probably won't be able to do this as a major upgrade since it will rely on the uninstall of the broken package for removal. The best way to get the old package uninstalled is to fix the problem with the package, change the package code, run a minor upgrade, then uninstall from add/remove.

You can disable the upgrade prompt in the Upgrades view by selecting "Don't prompt the user, just install the upgrade"

If you want to take it a step further and prevent the user from having to go to add/remove programs and uninstall the package that was only installed for the purpose of removing the previous build of the package, you could have the new package include a bat file in the SUPPORTDIR, use an installscript function to copy the file to the system so that its not tracked by a component, and then at the end of the install call the bat file from an Asynchronous custom action.

In the bat file, start with a sleep period to allow for the msiexec process to end from the upgrade, then execute the uninstall string for the package: msiexec /x {Whatever the GUID is}.

echo whatever you want to the console to keep the end user informed that it is still doing its thing.

After the package is uninstalled, have the .bat file delete itself. It will need to create another process so the bat can be deleted without error:

start /b "" cmd /c del "%~f0"&exit /b

call :deleteSelf&exit /b
:deleteSelf
start /b "" cmd /c del "%~f0"&exit /b
0 Kudos