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

problem in minor update using differential patch


5 replies to this topic

k3nn

k3nn
  • Members
  • 9 posts

Posted 11 July 2005 - 09:54

I have built a test Basic msi installer (using installshield 10.5 sp1) as follows:

V1.0.0
V1.0.1
V1.0.2
V1.0.3

V1.0.1 - .3 points to the old V1.0.0 uncompressed images. so that patching can perform MINOR upgrades:

V1.0.0 -> V1.0.1
V1.0.0 -> V1.0.2
V1.0.0 -> V1.0.3

but three problems surfaced:

1) I applied patch 1, but can't apply later patches. I assume it's because of the deltas. but in the add/remove programs, I can only uninstall 1 item, uninstalling it will prevent all patches now. I've tried uninstalling the patch via command line: msiexec /uninstall productcodepatch1 (while the patch 1 was installed): doesn't work. I've had the "allow this patch to be uninstalled" checked, but still no go.

2) I can apply patches in reverse order without problems and the files are accurate. This means I apply patch3 first, then followed by patch2 then finally patch1. Each of the files in the steps I confirmed that the files are correct for the patch installed. The question is why i can do this but not for the sequence patch1, patch2 then patch3? (the error says the patch isn't valid for the installed product, which is correct) is there something simple i'm missing?

3) I've tried all kinds of experiments in the Installshield IDE for patching, but still nothing works. I've tried to uninstall patch1 first before applying patch2 thru installscript but it can't find the productcode of the patch1 (i've fixed the patch1 guid to a value and turned off generate guid for it).

help? i can send the test project (*.ism) to anyone who likes to see these problems.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 July 2005 - 10:01

Are these MSI 3 patches or MSI 2 patches?
QUOTE
1) I applied patch 1, but can't apply later patches. I assume it's because of the deltas.

What are the exact symptoms (error messages), what makes you think it's because of the deltas? Did you try with full files instead of deltas?

Ideally with MSI 3 you should build small updates instead of minor updates (i.e. don't change the ProductVersion) and use the PatchSequencing metadata.

k3nn

k3nn
  • Members
  • 9 posts

Posted 12 July 2005 - 10:49

thanks stefan.

the deltas behave odd in that I can't perform more than 2 differential patches. The exact error message of the patch2 when I apply it using Update.exe is, i think, "This patch can't be installed because the patch is for a different product...", this is after installing patch1. anyway I don't know what you mean by 3 patch or 2 patch MSI...i just built the patches thru the IDE patch designer, I added 3 release objects. That is so I can build 3 patches.

I have first built the full patches (and their uncompressed versions), they are working fine and can update the V1.0.0 and there are no problems on the subsequent full patches as well.

I think I got the problem. The update.exe that the delta patch made can't uninstall the old patches, I made my own C++ program just to uninstall all the previous patches it found for the product. Then I add this as binary file so that custom action can find it and execute it immediately before I let it install the new patch.

I suspected the deltas because it made sense in that they are built with differentials from the V1.0.0 files. If user applied the 1st patch, the 2nd patch can't identify the product as V1.0.0 but as V1.0.1. so it gives the error "can't be installed" because its delta was made only for V1.0.0.

as for small updates, I can't use that as there is no info what the current patch is. We need version info for the patches we make. Our other codes and app depend on that info. I admit I might be going a long road with this, but i can't seem to find the shortcut.

As i write this, I am testing my C++ codes and will update this thread for the results. I have manually uninstalled the patches I made using msiexec as thus:

msiexec /uninstall {patchcode guid} /package {productcode guid}

after that I can then install patch2 after this, then update.exe can proceed.

tsuss!

Edited by k3nn, 12 July 2005 - 11:01.


k3nn

k3nn
  • Members
  • 9 posts

Posted 12 July 2005 - 12:48

I have a new problem relating to the patching above.

I've created my exe to uninstall the patch, the exe is a simple c++ program that is tested to work by enumerating the installed patches of the product guid and then calling msiexec to uninstall them. This works ok as i tested it in a dos box.

I've made the v1.0.0 up till full patch V1.0.3 to have this as a custom action that is stored as a binary file so Installer can call it first before anything else. I've made differential patches from these full patches as before using V1.0.0 as their previous build.

the problem now is when applying the patch2 after patch1 is installed, patch2 doesn't execute my CA instead it shows the error (I attach it here) first before my exe runs (I know because I had the exe display a messagebox). This despite the fact that I used sequence number 3 for this CA in the Execute sequences (not UI sequence).

this is the exact log file I got executing it in silent mode (update.exe /s /v"/l log.txt"):

-------------
MSI © (90:C4) [19:39:49:923]: Final Patch Application Order:
MSI © (90:C4) [19:39:49:923]: {C2544B91-FF81-4859-AECC-18E7BB5A0F1A} -
MSI © (90:C4) [19:39:49:923]: Other Patches:
MSI © (90:C4) [19:39:49:923]: Unknown\Absent: {FD9DBEC6-EA1A-43F8-B8F4-F9A1A8D57A5C} -
PatchConfiguration2.msp 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 update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch.
E:\WINDOWS\Installer\1f785fe.msi
MSI © (90:C4) [19:39:49:923]: Product: testbasic - Update '{FD9DBEC6-EA1A-43F8-B8F4-F9A1A8D57A5C}' could not be installed. Error code 1642. Additional information is available in the log file E:\My InstallShield 10.5 Projects\testbasic\PatchConfiguration2\Patch\log.txt.

MSI © (90:C4) [19:39:49:923]: Product: testbasic -- Installation failed.

----------
the 1st GUID is the product code of the V1.0.1 patch. the 2nd (unknown/absent) is the one currently being installed. the log.txt file is the exact same contents as this. Error 1642 is ERROR_PATCH_TARGET_NOT_FOUND.

Yes, I know the target is not found because it detected the patch1 guid, not the V1.0.0 guid, and since the patch2 is delta of V1.0.0 and patch2. this makes sense. What I want to know is, why my Custom action located at the beginning didn't run?if full patch installer is run, then my CA gets called.

How can I execute my CA in a self-executable update.exe?

Attached Images

  • patchError.JPG


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 13 July 2005 - 12:23

QUOTE
Are these MSI 3 patches or MSI 2 patches?

I mean: Are these patches buit to be installed using the MSI runtime version 3.x or version 2.x. In other words: do they include patch sequencing metadata.

k3nn

k3nn
  • Members
  • 9 posts

Posted 13 July 2005 - 15:25

i have fixed it!

totally my fault, i haven't paid attention enough on the context menus, and so failed to create multiple targets for previous versions. pls look at the screenshots of old and new patch designs.

the new patch design works flawlessly except that it emits an error if i create another set of "Latest2" for the new patch designs. It's complaining that I have a guid that is not unique; i don't recognize the guid (most probably a newly created patch code). To solve this, i have to reuse the "Latest1" config then point it to the latest uncompressed msi version, then add a "previous" item and point it to the current uncompressed msi version (the one that "Latest1" used to point to).

other than this, diff patching works perfect.

About the patch sequence, i haven't any idea yet and just use default. The exe i build use both MSI 2 & 3. Thanks, I think this is it for now.

Attached Images

  • patchdesigns.JPG