|
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.
|
|
|
|
|
Hello,
I have the same problem and I succeed to solve it.
The problem come from when you use differents hard drive letters between temp folder and installer folder.
For that, you need to modify patch.cmd.
Change the "chdir" command to force change hard drive letter and not just folder.
You need to add "/D" to the command and it is working.
chdir /D %PatchDir%
|
|
|
|
|
Please Hellp me to create the patch file for my VS.net 2003
I am using XP Prof version
I copied the CMD script and done nesessary changes like unwrap the code etc.
i followed the steps as it is.
the result is
=================
***** Log starting: 2006-04-19 12:07:20 *****
Input-PCP path = 'patch.pcp'
Patch-MSP path = 'Patch\patch.msp'
Temp Folder = 'C:\~VSTMP\Tmp\'
Patch GUID = '{64EE4D8C-577E-4432-B1E4-941C309480F1}'
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 = '<blank>'
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.
ERROR: UpgradedImages.MsiPath 'C:\~VSTMP\UpgradedImage\setup.msi' does not exist.
***** Log finishing: 2006-04-19 12:07:20 *****
======================================================================
The Script is like this (same code) :
---------------------------------------
if "%1"=="" %0 Debug Release Done
@SETLOCAL
@set path=%path%;"C:\Program Files\Microsoft Platform SDK\Samples\SysMgmt\Msi\Patching"
@set PatchTmp=C:\~VSTMP
:loop
if "%1"=="Done" goto end
if not exist %1\*.msi goto nopatch
if not exist TargetImage\%1\*.msi goto nopatch
:ok
rmdir /s /q %PatchTmp%
mkdir %PatchTmp%
mkdir %PatchTmp%\TargetImage
mkdir %PatchTmp%\UpgradedImage
mkdir %PatchTmp%\Patch
for %%a in (TargetImage\%1\*.msi) do copy %%a %PatchTmp%\setup.msi
msiexec /qb /a %PatchTmp%\setup.msi TARGETDIR=%PatchTmp%\TargetImage /L*v %PatchTmp%\TargetImage\setup.log
del %PatchTmp%\setup.msi
for %%a in (%1\*.msi) do copy %%a %PatchTmp%\setup.msi msiexec /qb /a %PatchTmp%\setup.msi TARGETDIR=%PatchTmp%\UpgradedImage /L*v %PatchTmp%\UpgradedImage\setup.log
del %PatchTmp%\setup.msi
copy patch.pcp %PatchTmp%
set PatchDir=%CD%
chdir %PatchTmp%
msimsp -s patch.pcp -p Patch\patch.msp -l Patch\patch.log -f %PatchTmp%\Tmp -d
rmdir /s /q %PatchTmp%\TargetImage
rmdir /s /q %PatchTmp%\UpgradedImage
rmdir /s /q %PatchTmp%\Tmp
chdir %PatchDir%
mkdir Patch
mkdir Patch\%1
copy %PatchTmp%\Patch\*.* Patch\%1\*.*
rmdir /s /q %PatchTmp%
:nopatch
shift
goto loop
:end
pause
-------------------------------------
Bhaskar Prasad Thamma
Sr.Software Engineer,
Vertical Marketing India
B-3,B.R.Princeton Aprts,
VIP Road
Visakhapatnam -530 003
ph 5564793 ,2597175
|
|
|
|
|
First double check you script to make sure the "for" lines and the "msiexec" line are on separate lines. It looks like you have appended the "msiexec" line to the end of the second "for" line and it should not be so.
Second, double check that you have created both ./TargetImage/Debug and ./TargetImage/Release; and that the VS Setup Projects directory also has a ./Debug and ./Release folder; and that there are setup.msi files in each of these folders. If you do not build Debug or Release versions you can leave these folders out if you remove the Debug or Release keyword from line 1 of the script.
If you still have problems, then let me know; but it is likely one of the above cuases.
|
|
|
|
|
Yes,I you are right,i appended teh msiexec.I brought down the msiexec and saved it run the patch.cmd.but same result.
Is setup.msi is the manditory name or can i change it to my setup name like "Websetup.msi"?
i ran with and without changing the setup.msi to websetup.msi,but result is same.please help where i am doing wrong?
i have created "TargetImage\Debug" and "TargetImage\Release" folders.
========
***** Log starting: 2006-04-20 19:21:59 *****
Input-PCP path = 'patch.pcp'
Patch-MSP path = 'Patch\patch.msp'
Temp Folder = 'C:\~VSTMP\Tmp\'
Patch GUID = '{64EE4D8C-577E-4432-B1E4-941C309480F1}'
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 = '<blank>'
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.
ERROR: UpgradedImages.MsiPath 'C:\~VSTMP\UpgradedImage\Websetup.msi' does not exist.
***** Log finishing: 2006-04-20 19:21:59 *****
===========
Bhaskar Prasad Thamma
Sr.Software Engineer,
Vertical Marketing India
B-3,B.R.Princeton Aprts,
VIP Road
Visakhapatnam -530 003
ph 5564793 ,2597175
|
|
|
|
|
It looks like you changed setup.msi to websetup.msi on step 10 or 11. Double check them and change them back.
The batch command will copy your existing *.msi file(s) into the temporary locations needed by the patch command and at the same time rename them to setup.msi so that they match the entries in patch.pcp. The patch.pcp file must point to the renamed files used to create the patch.
|
|
|
|
|
even I had the same problem
But I could overcome it.
Chdir in the patch.cmd was not working so I had that error.
I tried it with c: cd %patchtemp% and d: cd %patchdir%(refer to two chdir commands in the patch.cmd )
And Bingo! it worked.
|
|
|
|
|
Hi,
Your article is really informative in terms of creating the patch. It would be really helpful, if you could provide us with this patch creation process aiming to make the patch uninstallable and the product will be in the previous state.. as with patch not installed.
Regards,
Parag.
|
|
|
|
|
Can you describe the "project deployment folder" that I need to place the patch.cmd, patch.pcp, and my targetimage folder? I am having trouble knowing for sure where that is..
thanks!
Robin
|
|
|
|