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

Small Update (Patch/Hotfix) of MSI


3 replies to this topic

Scott Mayham

Scott Mayham
  • Full Members
  • 54 posts

Posted 12 April 2011 - 15:01

Folks,

(This ammends an earlier post, after more analysis).

I'm using InstallShield Pro 2011. I am trying to patch an existing MSI.

This MSI was NOT authored using InstallShield, but rather was generated directly out of VisualStudio 2010. This MSI has a UI action "MaintenanceForm", offering to either Repair or Remove the MSI. This UI comes "free" as part of what VisualStudio generates - it is not custom in any way.

I looked at the MSI with ORCA, and the UI action has a condition set on it of INSTALLED<>"", which I understand means "run this action if the product is installed", which is reasonable, except when patching.

My patch, produced using the InstallShield Patch Design view, has the same settings as the original MSI for Upgrade Code, Product Code, and Product Code. It runs fine, and it patches properly. However, during the patching process, the MaintenanceForm UI appears, asking if I want to Repair or Remove. If I select Repair, and click Finish, the patch proceeds ok. However, I would like to see that particular UI suppressed, if possible, because it might alarm or mislead customers.

Now, if I had control over the production of the original MSI (I didn't), I would have made the condition on MaintanenceForm to be INSTALLED<>"" AND NOT PATCH, or some such. But it's too late, the MSI is "in the wild".

Is there any way a Patch can suppress an improperly-conditioned UI in a base MSI?

Thanks,
T. Scott Mayham
Senior Software Engineer - Innovations
678 319 8384
Scott.Mayham@Infor.com

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 April 2011 - 20:22

The UI during a patch should be coming from the new version. Does your patch have the old (VS) UI dialogs, or those from InstallShield?

MSIYER

MSIYER
  • Full Members
  • 90 posts

Posted 19 April 2011 - 09:04

My reply to Scott Mayham on Flexera forum:
This behaviour is appropriate as patching is essentially repairing the application using transforms. The log was required to diagnose any other issues. I have no idea of how Visual Studio creates packages. Conditions enforced on dialogs in VS are not known to me.

In Installshield the default conditional expression enforced on maintenance dialog is "Installed And Not RESUME And Not Preselected And Not PATCH".
This means:
The maintenance dialog will not pop-up during pathch install.

Thus installation packages created with Installshield will not cause this trouble.

Since your installation is already in the wild, you cannot modify the UI sequence as the cached msi file is used during the maintenance.

Try using the silent mode flags for patch installation and post the results.

But I dug deep and feel I could have been wrong. My next post at Flexera forum:
I feel I was wrong when I said that the base cached msi will be used during patch install. Your post made me dig further and it seems that the base cached msi is modified at runtime by the Windows Installer engine prior to the display of dialogs. That means, if you make proper changes in the newer version of your msi, i.e., add the proper condition to the dialog "NOT PATCH" etc... and then go on to create the patch, the UI changes should reflect during the patch install.

The transforms in the patch are applied to cached msi prior to the display of patch installation UI.

Please follow the following link:
http://www.softsummi....press_ch12.pdf

This link has all details you would need to work out of your situation:
http://email.softmar...hing_Sept08.pdf

Read the whole thing carefully.
I apologise for the mistake.

Edited by MSIYER, 19 April 2011 - 16:29.


Scott Mayham

Scott Mayham
  • Full Members
  • 54 posts

Posted 19 April 2011 - 14:47

MSIYER, Stefan,

(Stefan first) - the UI comes from the InstallShield-generated patch, except for the MaintenanceForm UI, which is from the VisualStudio-generated Base MSI. VS builds this with the condition: Installed<>"". Note that there is no provision for patching in this condition, as there is with MSIs generated by InstallShield.

(MSIYER) I appreciate your digging. I also looked more carefully through the log, and saw essentially what you describe, that the Windows Installer engine performs a transform, actually building a new installer using the cached original plus the patch, and then running the result.

I will examine the links you provided - thanks again.

(Both...)

What I did as an interim fix was to write a lillte VbScript which adds the "And NOT PATCH" to the condition of the Maintenance UI, in the MSIs as they are produced by VisualStudio. This makes any future releases a bit more Patch Friendly, but does nothing about previous MSIs which are in the wild. I'm hoping your suggestions work out in that regard.

I'm wondering if I should write a new CA for the patch, based on the above script, which changes this condition at the beginning of the UI sequence. Would this work?

A longer-term solution will be to author these MSIs using InstallShield - and that's the plan for our next major release, so eventually this issue will diminish. Until then, I'd like to find out how to make VisualStudio produce MSIs which have those Patch-Friendly conditions build-in. DOES ANYBODY OUT THERE KNOW HOW TO MODIFY HOW VS PRODUCES MSIs?

Thanks and Regards,
T. Scott Mayham
Senior Software Engineer - Innovations
678 319 8384
Scott.Mayham@Infor.com