Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Nested Installation Action


2 replies to this topic

Arianna

Arianna
  • Members
  • 6 posts

Posted 12 June 2002 - 00:05

Developer 7.03 - Basic MSI

If an end user currently has my software on his system, I would like to give him the ability to "Replace" the existing software. This action consists of running the "msiexec /x{ProductCode}" found on their system, and then continuing as if it were a clean install.

I realize that Microsoft will only allow one "msiexec" item to be within the "Execute" section of the sequence at one time. I have no problem running the removal via a Nested Installation from a Custom Action launched by a GUI window.

The problem comes when a user inserts a CD with the same Product Code that exists on their system. The removal works great, but when the software continues where it had left off, it appears that the removal settings are 'sticky.' My installer tries to remove the software once again and then tells me the installation is complete. (Not exactly what I hoped to see.)

Has anyone found an easier way to "Replace" existing software on a user's system? Or does anyone know how to fool the windows installer into believing that this is a first-time installation?

Arianna

Arianna
  • Members
  • 6 posts

Posted 13 June 2002 - 19:21

I have found a temporary solution to this problem, but I feel it is more of a "hack" than true coding.  

I simply create a temporary registry key under HKLM/SOFTWARE/MyProductREPLACE that stores the value of the MSI Property SETUPEXEDIR. Then, I give up control to the msiexec uninstaller and let it do its thing. I have added a deferred Custom Action MyRemove with condition REMOVE="ALL". If it detects the temporary registry key it deletes the entry and launches the setup found in SETUPEXEDIR.

I would still like to know if anyone has a better way to do this in MSI.  ???

pnunes

pnunes
  • Members
  • 13 posts

Posted 02 October 2002 - 19:38

How about using the Upgrade table? This table is used to handle transitioning from product to product. I have even used it to uninstall previous copies so that the workstation is "fresh" for the new install.