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

Prvent a patch from being applied


1 reply to this topic

RayKode

RayKode
  • Full Members
  • 58 posts

Posted 08 September 2011 - 13:47

Good morning,
It has been some time since I last posted a question to this forum.
I hope everyone is well.

I want to know, how I can prevent a patch (or at least display an error message) when a user attempts to apply it (the patch) to a version of my application for which the patch was NOT authored ?

Please read on for the details.

IS 2011 professional.

I have four versions of my application.
1.1.1
1.1.2
1.1.3
1.1.4

I build a patch (via the patch design view) with Latest1 containing 1.1.3 and Prev1 containing 1.1.2.

The patch works perfectly when applied to version 1.1.2 of my application.

What I have found however, is ........

One:
I receive an error message [The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing or the upgrade patch may be for a different version of the program.]
if I try and apply this same patch to 1.1.4 of my application. (A GOOD thing.)

Two:
The patch actually runs if I apply it to version 1.1.1 of my application.
(A BAD thing.)

Three:
The patch actually runs if I apply it to version 1.1.3 of my application. (A BAD thing.)

Here are my questions:
Question one:
Is the above behavior to be expected ?
For some reason, I expected the same error message (please see above), that I get when applying the patch to version 1.1.4 of my application, when I try and apply the patch to versions 1.1.1 and 1.1.3 of my application.

Question two:
Is there a way for me to, in some fashion, stop the path from being applied to versions of my application older than what is in the Prev1 folder ?
(In this case it is version 1.1.2)
Ideally, I would like the user to receive the same error message as documented above.

Question three:
Is there a way for me to, in some fashion, stop the patch from being applied to version equal to the version that is in the Latest1 folder ?
(In this case version 1.1.3)
Ideally, I would like the user to receive the same error message as documented above.


Thanks in advance for any and all responses.

Ray in Wisconsin

Edited by RayKode, 08 September 2011 - 13:49.


RayKode

RayKode
  • Full Members
  • 58 posts

Posted 08 September 2011 - 17:52

Thanks to both George and Alpesh at Installshield, I have come to understand the solution to my issue as ....

Set the Version Relationship value to either "Previous Setup Version >= Latest Setup Version" or "Previous Setup Version = Latest Setup Version", for each "PrevXX" in my patch project.
Either value produces the exact same result for me.

Using my previous post as an example then:

Employing the above Version Relationship setting(s) ....
I now receive the
[The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing or the upgrade patch may be for a different version of the program.]
message ...

If I try and apply the patch ...
Over an already installed version 1.1.1 of my application.

Over an already installed version of 1.1.3 of my application.

Over an already installed version 1.1.4 of my application.

So life is now grand.