|
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.
|
|
|
|
|
I am using MSI 3.0 to create a patch for my application. My OS is WinXP. I have had no problems creating the patch and updating my application until now. The log patch.log is attached below:
***** Log starting: 2006-06-05 20:26:40 *****
Input-PCP path = 'patch.pcp'
Patch-MSP path = 'Patch\patch.msp'
Temp Folder = 'C:\DOCUME~1\NITINJ~1.MIN\LOCALS~1\Temp\~PCW_TMP.TMP\'
Patch GUID = '{E27E1BF8-1092-426D-9A77-E43A43495BC6}'
ListOfPatchGUIDsToReplace = '<none>'
ListOfTargetProductCodes = '*'
PatchSourceList = 'PatchSourceList'
AllowProductCodeMismatches = '1'
AllowProductVersionMajorMismatches = '1'
OptimizePatchSizeForLargeFiles = '<blank>'
ApiPatchingSymbolFlags = '0x00000000'
MsiFileToUseToCreatePatchTables = '<blank>'
SqlCmdToCreatePatchTable = '<blank>'
SqlCmdToCreatePatchPackageTable = '<blank>'
SqlCmdToCreateMsiPatchHeadersTable = '<blank>'
DontRemoveTempFolderWhenFinished = '1'
IncludeWholeFilesOnly = '0'
MinimumRequiredMsiVersion = '200'
SEQUENCE_DATA_GENERATION_DISABLED = '1'
AllowRemoval = '<blank>'
Using internal SQL cmd to create 'Patch' table.
Using internal SQL cmd to create 'PatchPackage' table.
Using internal SQL cmd to create 'MsiPatchHeaders' table.
Src file missing: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\TargetImage\.\AcroForm.api'.
Patch API could not create a small patch; using whole upgraded file.
Including entire file: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\UpgradedImage\.\AcroForm.api';
FTK=_54EB612240EFABFD72D53EA91B195012; temp location=LastName\00002.FLE.
Src file missing: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\TargetImage\.\Microsoft.VisualBasic.Compatibility.dll'.
Patch API could not create a small patch; using whole upgraded file.
Including entire file: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\UpgradedImage\.\Microsoft.VisualBasic.Compatibility.dll';
FTK=_72013CE8896C137F81533652EAA810FE; temp location=LastName\00003.FLE.
Src file missing: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\TargetImage\.\Xceed.FileSystem.dll'.
Patch API could not create a small patch; using whole upgraded file.
Including entire file: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\UpgradedImage\.\Xceed.FileSystem.dll';
FTK=_724F9F7F8A12DBBB1BA2B11F606A5CB7; temp location=LastName\00004.FLE.
Patch API could not create a small patch; using whole upgraded file.
Including entire file: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\UpgradedImage\.\Acrobat.tlb';
FTK=_7A75061B62E5792F9DDAD521C50649EF; temp location=LastName\00005.FLE.
Src file missing: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\TargetImage\.\Interop.Acrobat.dll'.
Patch API could not create a small patch; using whole upgraded file.
Including entire file: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\UpgradedImage\.\Interop.Acrobat.dll';
FTK=_8A7867EF2BE856F21E418E8AF61B1353; temp location=LastName\00006.FLE.
Src file missing: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\TargetImage\.\Interop.AFORMAUTLib.dll'.
Patch API could not create a small patch; using whole upgraded file.
Including entire file: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\UpgradedImage\.\Interop.AFORMAUTLib.dll';
FTK=_91ACDB022BD0B640B8AE6AC9612F70BE; temp location=LastName\00007.FLE.
Src file missing: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\TargetImage\.\logo.jpg'.
Patch API could not create a small patch; using whole upgraded file.
Including entire file: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\UpgradedImage\.\logo.jpg';
FTK=_B6961ECEDD514180B6A15B6B72418C05; temp location=LastName\00008.FLE.
Src file missing: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\TargetImage\.\stdole.dll'.
Patch API could not create a small patch; using whole upgraded file.
Including entire file: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\UpgradedImage\.\stdole.dll';
FTK=_BFF88D76D8CF5AFEFACA100B078002AC; temp location=LastName\00009.FLE.
Src file missing: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\TargetImage\.\Xceed.Ftp.dll'.
Patch API could not create a small patch; using whole upgraded file.
Including entire file: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\UpgradedImage\.\Xceed.Ftp.dll';
FTK=_C2932A2A9FF133C2370E00CBB4551388; temp location=LastName\00010.FLE.
Src file missing: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\TargetImage\.\base.pdf'.
Patch API could not create a small patch; using whole upgraded file.
Including entire file: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\UpgradedImage\.\base.pdf';
FTK=_F994A022C8C54512B08168D96D98E2C2; temp location=LastName\00011.FLE.
Patch API could not create a small patch; using whole upgraded file.
Including entire file: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\UpgradedImage\.\medappzDMS.exe.config';
FTK=_954EE4F4B28E4E9A9D4D02B077AA4E64; temp location=LastName\00012.FLE.
Patch API could not create a small patch; using whole upgraded file.
Including entire file: 'G:\MedAppz-2\Codebase\DMSWithWebService\DMS_WinApp\Medappz DMS\UpgradedImage\.\medappzDMS.exe';
FTK=_BD871DF5784002D56D8F2B100A51D276; temp location=LastName\00013.FLE.
***** Log finishing: 2006-06-05 20:26:55 *****
On running the patch it gives an error:
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2709.
What can be problem here with my patch?
Thanks
Nitin
|
|
|
|
|
Sorry it has been so long getting back to you, I have been completely swamped with work.
In your previous patches, did you see the patch creation report "Src file missing" on these files before? Have you tested the stand-alone msi file of your old and new versions by themselves as a fresh installation to assure that they work?
|
|
|
|
|
Hi, first thanks for sharing this article.
Secondly, would ask for help as I am getting error when I run this command-line:
msimsp -s patch.pcp -p Patch\patch.msp -l Patch\patch.log -f C:\~VSTMP\Tmp -d
The error is "Failed to create patch. Error code: 0xC00E5114".
I am running Visual Studio 2005. Reviewed and checked all the settings here but still I am getting the same error.
Any help would be appreciated.
Regards,
Yoeru
|
|
|
|
|
Firstly, I have not tried this with 2005. However, there should also be another text line above the one you quoted that will give clues to cause. The normal cause for failure to create the patch is that the product code is wrong, or that the updated msi file indicated that it was a version change rather than a minor change. In 2003, when you change the installer version number and it asks you whether to update the product code, you must say no. I do not know what 2005 does in this case.
|
|
|
|
|
I tried this with VC2005 and it was giving me the same error. On viewing the patch.log, I noticed that msimsp was looking for UpgradedImage\setup.msi in the path relative to the directory from where patch.cmd was executed from and not from c:\~vstmp\UpgradedImage\setup.msi.
To fix this, I changed the MsiPath from 'UpgradedImage\setup.msi' to 'c:\~vstmp\UpgradedImage\setup.msi' in the record added in UpgradedImages in the patch.pcp file earlier created. I did the same for TargetImages in pcp file i.e. changed 'TargetImage\setup.msi' to 'c:\~vstmp\TargetImage\setup.msi'. Ran the patch.cmd again and it created the patch.msp for me but again, not in the c:\~vstmp\patch directory but directly in the directory where patch.log is created. Anyway, the point is, it worked!
Oh another thing, when I copy/pasted the code for patch.cmd from the webpage to the notepad, it added a space after '@set PatchTmp=C:\~VSTMP' line and some newline characters in msiexec commands, so that was messing the whole routine as well. So just check for this when you create the patch.cmd file.
Thanks mjmeans!!
|
|
|
|
|
Yes. CodeProject.com wraps the code text "for readability", but you must unwrap it for the command to work. I'm glad to see you have it working now.
|
|
|
|
|
mjmeans,
First of all thank you very much for providing such an excellent artical to create a patch. I did every thing perfectly as per this artical and in One place I got stuck. While running the patch.cmd file at below command-line I am getting error.
msimsp -s patch.pcp -p Patch\patch.msp -l Patch\patch.log -f C:\~VSTMP\Tmp -d
The error is "Failed to create patch. Error code: 0xC00E5114".
I followed all the changes which you mentioned in this mail and still I am receiving the same error.
Please help me out to resolve this error and let me know, if I need to do anything extra for this.
Thank you,
Narayana
|
|
|
|
|
I had the same upgradedImage problem...
I found that it was a mistake in patch.cmd i.e chdir was not working on my PC
so jst try cd command or use C: and cd %patchtmp% instead of chdir %patchtmp%
Dont make any changes as u did it in patch.pcp files earlier(changing the Msi path etc).
See it works.
|
|
|
|