I need a self removing MSI - Advanced Installer Community
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

I need a self removing MSI

Hi,

I want to install a database, which I have scripts for and then just remove the software installation once this is done.
I thought I was doing this with a deferred CA but of course I get the error ERROR_INSTALL_ALREADY_RUNNING as I am using msiexec.
I thought deferred meant that it would do this after everything was finished but obviously the installer is still active.
Having spent some time on this I have written some scripts that I thought would do it but it is still not removing th eproduct.
I want something with the equivalent of MSIExec.exe /X{Product Code}.

Have you any idea how I can achieve the removal of the product in this i.e. something like spawning a process that waits for the installer to finish?
I have tries this in script but obviously as I said MSIExec is still active.

Thoughts,
John
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: I need a self removing MSI

Hello John,

If you don't want your product be listed in control panel programs list, then the solution is to not register it with Windows Installer. For this you can uncheck our "Register product with Windows Installer." option from "Product Details" page.

However, if you still want to run a product removal using a custom action at the end of the installation, then you can add your custom action after "Install Execution Stage -> Finish Execution" action group and uncheck its "Wait for custom action to finish before proceeding" and "Fail installation if custom action returns an error" execution options.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”