|
Could any one please help me out to create a patch using CAB files. My application runs in a PDA. For this we create a CAB file instead of MSI file to install in a PDA. Now I want to create a patch using those CAB files.
Thank you,
Narayana
mail me : vgnarayana@yahoo.com
|
|
|
|
|
I dont know how to do that. Perhaps someone else can help.
|
|
|
|
|
I get the following message when trying to update the msi.
"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."
Do you have any idea why it cannot find the original program?
Thanks
|
|
|
|
|
You probably didn't follow step 15 correctly. If you answered YES, which is the default, then VS will create an installer which is considered a new major update and the patch process will fail with this message because it only allows patches for minor releases. Minor updates are created only when you select NO.
|
|
|
|
|
Hi mjmeans,
Thanks for getting back to me. I did follow step 15 correctly, but I obviously have done something else wrong. I am trying to make my first patch, and my .exe and all dll's are version 1.0.0.0, as well as the setup installation. I changed 1 dll to version 1.1.0.0, and the exe to 1.1.0.0. The new setup program is 1.1.0.0. When I build the patch, it says it found diffenences in both of them. Do you know of a way I can fix this?
Thanks
|
|
|
|
|
For anyone interested in this matters, you can read the White Paper: Patch Sequencing in Windows Installer version 3.0. You can find it under http://www.microsoft.com/downloads/details.aspx?FamilyID=ad7ac91e-2493-4549-ae6f-bf5e007c12a3&DisplayLang=en
____________________________________________________________________
Never underestimate the power of stupid people in large groups.
|
|
|
|
|
Following scenario: I have an app in V 1.0. Then I make a patch for V 1.1 (np with your article). Then I have V 1.2. I can make a patch that goes from V 1.0 -> V 1.2 and one from V 1.1 -> V 1.2. Can I make a 1.2 Patch, that works for both (V 1.0 and V 1.1)?
I hope you understand what I mean. To make an example: Windows XP SP2 also includes SP1 and you cna install it on Win XP and Win XP SP1. I want to do the same. A patch that includes all patches that where before and installs just the part that is missing.
Can I do that with your Patch strategy, and if yes, how?
Thanks, Rainer
____________________________________________________________________
Never underestimate the power of stupid people in large groups.
|
|
|
|
|
I dont know of a way to make a single patch that will work with multiple prior versions of the application.
|
|
|
|
|
I made one patch 1.0 -> 1.1 and now one 1.1 -> 1.2 . The good news is, if you try to install the second one, without having installed the first one, you get an error message. So the user has to install all patches in the correct order. The bad news is, if you install first the first patch (everything is fine) and then the second one, the update is not applied (but no error message). You also can't see the new patch in Control Panel -> Add/remove Software.
I think the problem is, that my second patch misses the information that it is a new patch and not the old one that is already there. Because I don't really understand the msi stuff, I don't know, which value I have to set.
Any ideas?
P.S.: I tried a new family, but that didn't changed anything.
____________________________________________________________________
Never underestimate the power of stupid people in large groups.
|
|
|
|
|
I found the answer: the PatchGUID (Properties table) must be of course a new one.
____________________________________________________________________
Never underestimate the power of stupid people in large groups.
|
|
|
|
|
First of all, THANK YOU! That's a really great article and it was exactly what I needed (and didn't find anywhere). Bascially everything is described perfect, but I had to do some minor changes (or I didn't udnerstand you correctly), that it worked.
Here is my small list of things that I changed to get it running (I'm using VS2005):
1.) As others already said: be carefull when copying the code for the cmd file, because Codeproject formats it a bit wrong: after the temp directory is a space and the msiexec line is split into two lines (twice!) adn also the msimsp line.
2.) PatchSequence: it says in the article to set it to 1.0.0. That didn't worked for me. Instead I copied the GUID "ProductCode" from my Setup Project.
3.) Just changing the version of my Setup project was'nt enough. In the log it founded the changed files (assemblies), but their FileVersion didn't changed. So I set the [assembly : AssemblyVersion("1.0.1")] and [assembly : AssemblyFileVersion("1.0.1")] in the Assembly.cs for the changed assemblies.
4.) Don't forget to change the PatchMetadata to set it to correct name and manufacturer.
Hope that helps.
____________________________________________________________________
Never underestimate the power of stupid people in large groups.
|
|
|
|
|
I am not useing VS2005 yet. But thanks for posting your results. I am sure others who use VS2005 will find it useful.
|
|
|
|
|
Thanks for this useful note, but:
I also use VS.NET 2005 for my setup project and have problems building patches.
When I run the patch, it asks me whether I want to repair the installation or remove it, like faffy described below. The version of the first setup is 6.0.0000 the second is 6.0.0001.
I did not find any help in the Whitepapers and MSDN.
Can anyone help me?
|
|
|
|
|
Thats ok, because MS considers a patch as a repair. Just click repair and everything should be patched as intended.
HTH, Rainer
____________________________________________________________________
Never underestimate the power of stupid people in large groups.
|
|
|
|
|
Thanks for this description.
Now I have the problem that AllowRemoval does not work. I tried to set it to "1" or to "yes". I also tried to change the classification int the PatchMetadata table.
Any idea?
|
|
|
|
|
When I run the patch, it asks me whether I want to repair the installation or remove it. The repair option updates the installation of course, but my question is, is there a way to customize this message? I ask this because 'repairing' sounds kinda weird for an update operation.
|
|
|
|
|
This sounds like you forgot to update the version numbers properly.
|
|
|
|
|
my system is not upgrade after run the patch.msp.
why this will happen? anyone face this problem?
|
|
|
|
|
In step 15, it instructs you to update the version number. This is required so that the patch generation compares versions properly. It also says to answer NO when visual studio asks to update the product and package code. updating the product and package code is done ONLY when it is a major upgrade requiring a complete MSI install. My guess is that somewhere along the way you told it YES to that question which is preventing the patch from working. You should open the original and updated MSI files in ORCA and look at the product package codes to make sure they are the same. If you are still having problems, let me know.
|
|
|
|
|
mjmeans thanks for your reply! I check on the property table, the ProductCode is same.
I have anotehr problem to ask you. My msi is 13MB, but the msp i build is only 38KB (i only change one line of my code). Is that correct/possible? Because my friend said my msp size is too small, maybe my msp don't success created.
|
|
|
|
|
It is posxsible with a very small msp file when there is only 1 line of code change and no other changes to the project. But this depends on many factors and specifically which merge modules you are using. One merge module I use actually has each DLL file in it twice! Once with short names and once with long names. This always causes msismp to get confused and include both DLLs for every patch, even though neither have changed.
Ok Assuming you checked BOTH ProductCode and PackageCode and confirmed they are the same, AND ProductVersion is a higher number, AND UpgradeCode is the same. Hmmm. I read somewhere a couple of years ago that VisualStudio does some calculations when updating some internal things based upon the version actually installed on the development computer. It also said that if the previous version was not installed on the development computer, that it would build the new msi file incorrectly. I have never seen this problem before, but you can try to install the old previous version onto the development computer, re-build your new msi file again and try to build the patch again.
Beyond that, I am at a loss to understand why you are having this problem. One of the settings above must be wrong, or have a typo.
|
|
|
|
|
I checked that my PackageCode are different for old vf updated version MSI files. So izit i wrong? Bcoz refer to step 15, it say :"PackageCode is a hidden property which VS.NET automatically updates each time you build the deployment project".
So if i want to get correct MSP installer, izit i need to make sure the PackageCode must be same for both MSI files?
|
|
|
|
|
I also have same problem. I had check the original and updated MSI files and found that the product codes were same for this two MSI files. I also found that the updated code also same for this two MSI files. After i create the MSP file successfully and i had check the patch.log files see everything compiled correctly with no errors. Then, i run the MSP files, there are no problems. But when i reopen my application, error occured.
"The file '_061AD4CE1F3945A2B9D389F477548D8C' cannot be installed because the file cannot be found in cabinet file. This could indicate i network error, an error reading from the CD_ROM, or a problem with this package.
After click "OK", another message prompt out "Fatal Error during installation".
Can anybody help me?
Thank a lot.
|
|
|
|
|
In certain cases, .NET does not always install all files until the application is run once after updating. I have seen, though rarely, that even though update completes, that when the program is run for the first time after updating, it still needs access to the update msi file or patch file once tom complete the update. This probably occurs because Windows thought that the file was still in use at the time is was being updated.
|
|
|
|
|
Hi,
I have the same problem. My MSP was build without any error, no typo, codes are ok.
But after I have successfully installed the MSP, the included files were not installed (sometimes, often).
I can avoid this behavior by removing the files before I install the patch.
Is it possible that the version number of the files can cause this? I do not update the version no for all the executables of the project for every patch.
The main problem is that one of the executables I want to change will be executed by the installer to do some custom things.
|
|
|
|