Lucas Carneiro
Posts: 8
Joined: Wed Sep 22, 2021 9:36 pm

Patch generation error

Tue Dec 28, 2021 7:49 pm

Hello,

Patch generation is having the following error:

Code: Select all

  ERROR: Cannot create patch file for 'Program.exe' at 'C:\Users\LUCAS~1.CAR\AppData\Local\Temp\~pcw_tmp.tmp'. 
  ERROR: 	The Last Error Received is: 0x8 (8) 
  INFO: Temporary folder is about to be cleaned out and deleted: C:\Users\LUCAS~1.CAR\AppData\Local\Temp\~pcw_tmp.tmp 
  ERROR: Internal PatchWiz Error occurred.
  ERROR: 	The Last Error Received is: 0x91 (145) 
  ERROR: During cleanup, could not delete the temporary folder: C:\Users\LUCAS~1.CAR\AppData\Local\Temp\~pcw_tmp.tmp. 
  ERROR: 	The Last Error Received is: 0x91 (145) 
MsiMsp.exe failed to create the patch file.
I found some issues here on the forum that reports the same error message, but none of the proposed solutions worked for me.

However, I performed a test based on the comments on this issue and had a different behavior than expected.
viewtopic.php?t=10888

In our template, we list all ".msi" files correctly as images, including x32 and x64.
PatchImages.png
PatchImages.png (55.49KiB)Viewed 2595 times
However, as we can see in the above issue comments there is a report that Advanced Installer does not support mixed platforms for patch generation. Bases on it, I performed tests considering only x32 packages and also considering only x64 packages. This way the error doesn't occur, however, we need to consider x32 and x64 and all the patches we've generated so far have been with this same template and we've never had any problems with that.

Any idea what might be causing this issue? Can't we really match x32 and x64 in the same patch? If not, because we never had this problem before?

Best regards,
Lucas

Liviu
Posts: 1035
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Patch generation error

Thu Dec 30, 2021 11:09 am

Hi Lucas,

MSI does not support mixed 32/64bit packages.

By using our mixed package you have an EXE package type so it should work. When you extract the mixed .exe for patch it will create two MSI, for x64 and x86. Then you need to make 2 patches between each two MSI.
I found on the
Is there a limit for targets in a patch project?
thread that someone had the same error and setting the patch option "Include whole files only" solved his problem.

Also, can you please try to find that file 'C:\Users\LUCAS~1.CAR\AppData\Local\Temp\~pcw_tmp.tmp' on your temp folder. Delete this file and try to build the patch again.

Some other users said that after disconnecting the virus scanner, the patch build succeeded.

Can you please tell me if any of this helps?

Otherwise, can you please send us by email to support at advancedinstaller dot com the following resources:

1. the .AIP (project file) for both versions.
2. and the patch project.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Lucas Carneiro
Posts: 8
Joined: Wed Sep 22, 2021 9:36 pm

Re: Patch generation error

Fri Dec 31, 2021 1:50 pm

Hi Liviu,

We've already tested the cleanup of temporary files and we've also done a detailed server analysis. What we hadn't tested yet was enabling the "Include whole files only" parameter and actually enabling it started to work.

I still don't know why I need to enable this parameter, but I think it might have something to do with the fact that we have a considerable number of patches between this last package and the original version, and for the advanced installer to be able to generate the differences it must consider all files complete.

Anyway, that solved our problem. Thank you for your support!

Best regards,
Lucas Ribeiro Carneiro.

Liviu
Posts: 1035
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Patch generation error

Mon Jan 03, 2022 1:18 pm

Anyway, that solved our problem. Thank you for your support!
You're always welcome, Lucas!

I'm glad everything works as expected now.
I still don't know why I need to enable this parameter, but I think it might have something to do with the fact that we have a considerable number of patches between this last package and the original version, and for the advanced installer to be able to generate the differences it must consider all files complete.
Using that option if a file has changed in the Upgraded package, the whole file will be included in the patch (not just the differences between the old file and the new one). I think the same, using a considerable number of patches will require that option so the Windows Installer can find the differences.

Please let us know if you have any other questions.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”