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

Install Patch


9 replies to this topic

sebica79

sebica79
  • Members
  • 62 posts

Posted 02 November 2005 - 10:37

I would like to know if is possible the following scenario:
I have already created an MSI as a Basic MSI Project. The msi file is already installed on the machine with a specific behavior for maintenance mode.
I would like to create a PATCH, which can contains some new versions of binaries AND I would like to change the behavior for maintenance mode case.
Now, I would like to do that without uninstalling the msi file, only to apply the patch.
Could be done through a patch or the only way is to create a transform (I don’t wanna this) ot minor upgrade (also, I don’t wanna this)?!

Thank you!

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 02 November 2005 - 11:32

A patch basically is (contains) a transform. So a patch should work.

sebica79

sebica79
  • Members
  • 62 posts

Posted 04 November 2005 - 14:55

Hello again.

Yes, you're right, is kind of tranform actually, but, I have a problem with the patch. How can execute a custom action when the patch is uninstalling? A new Custom Action, defined in patch.
I have tried many things and it seems that doesn't want to execute anything when I choose Add/Remove the patch from the Control Panel.
Why I'm asking, becasue I need the value for InstallLoacation key from the registry after the patch was uninstalled.
When I'll uninstall the base msi, I need that value for kill a process. Right now, I cannot modify that project, only through the patch I can modify somthing. And after the Path is uninstall, the value is overwritten because no custom action is executed (here should have been execute the "SetARPINSTALLLOCATION", but at uninstall, it doesn't).
That's why I need another way to set back the value in the registry for the InstallLocation.

Please help me somehow, with an idea or something.

sebica79

sebica79
  • Members
  • 62 posts

Posted 08 November 2005 - 08:41

Has anybody some idea about that?!

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 08 November 2005 - 11:54

Sorry, I don't quite understand what you want to do. Is the problem that InstallLocation is missing after uninstall of the patch? Could you use an AppSearch to locate the installation folder? (See the MSI SDK for more information on the AppSearch feature)
Regards
-Stein Åsmul

sebica79

sebica79
  • Members
  • 62 posts

Posted 08 November 2005 - 15:24

OK, but where can I use the AppSearch, becasue my problem right now is that I cannot execute any custom action on patch uninstall process. Is this kind of limitation of InstallShield. i have tried an standard dll custom action adn InstallScript custom action, neither has not worked.

What I want to do is to write back, during patch uninstall, the value for InstallLocation (right now is deleted during patch uninstall).

akerl

akerl
  • Full Members
  • 104 posts

Posted 08 November 2005 - 16:21

You can't implement a CA in a patch, that is executed while patch uninstall, because in this scenario the patch isn't applied to the in memory view of the package. Create two patches. The first (sequence on top) has the CA and is marked as uninstallable. The second has your own implementation. If you uninstall your patch, the first patch is applied to the memory view and the CA is executed.

See also:
http://msdn.microsof...tom_actions.asp

- Andreas

Andreas Kerl

Inside Windows Installer 4.5
ISBN 3-86645-431-7


sebica79

sebica79
  • Members
  • 62 posts

Posted 09 November 2005 - 08:38

Thank for the answer but I stil have some questions:
Do you mean that I have to create two pathes. The first one based on the orginal msi file and it must contain the CA that should be executed at uninstall only. And also, it must not be able to be uninstall. The second one must be based also on original msi or based on the first patch? If I create the second patch based on the original msi file, when I'm trying to install it, the CA still not got executed - maybe I have to create in some way both patches, with a kind of relantions between them.
What I have done, till now, I have created the first patch based on original msi file - as Add new path Configuration from Patch Design. In this patch I put the CA to be executed when REMOVE~="ALL". I have created the second patch, in the same way, as "Add New Patch Configuration: (I don't know if this is ok), based also on original msi file. In this patch I have added some new files to be installed and some new binary version. Also I have added the same CA with the same condition to be executed.

Please, correct me if I have done something wrong.

The CA is still not executed. As I told you, may be it matter the way how is created the second patch.

I'm looking for the asnwer, thank you very much.

akerl

akerl
  • Full Members
  • 104 posts

Posted 09 November 2005 - 13:40

1. Since MSI 3 we'll create baseline patches only, so all patches based on the last baseline. In your case, both patches are based on original package. The helper patch (with the CA) must have a lower sequence in the table MsiPatchSequence of the .msp as the regular patch.
2. Your condition is wrong. Your condition REMOVE~="ALL" is only true, while product is uninstalled. This condition is false, if you remove the patch. In patch uninstall scenario, MSI writes the patchcodes of all patches to unistall in the property MsiPatchRemovalList. You must use this property as condition.

- Andreas

Andreas Kerl

Inside Windows Installer 4.5
ISBN 3-86645-431-7


sebica79

sebica79
  • Members
  • 62 posts

Posted 09 November 2005 - 13:42

Hi there,

Thank you for the information ... I'll try it right now, I'll let you know what I'll find.

Thank you again.