invalidptr
Posts: 79
Joined: Thu Nov 18, 2010 7:10 pm

Patch fails with "Error reading from file"

I am unable to get a simple patch to work in AI 8.0.2 and I'm hoping it's something obvious I've missed.

1 - In my AIP project that creates an .exe, I've made sure "Do not delete extracted MSI and CAB files" is checked.
2 - Created the .exe and labeled it setup_132.exe
3 - Changed the product version to 0.9.133 and told it not to generate a new product code.
4 - Dropped newer files into APPDIR. It is not set to synchronize.
5 - Built the project and renamed it to setup_133.exe
6 - Dropped to DOS and executed "setup_132.exe /extract" and "setup_133.exe /extract" and saved the contents into two folders: "133" and "132".
7 - Launched a new instance of AI and selected Patch. Went through the patch wizard and selected the appropriate MSI file from "133" and "132".
8 - Generated a patch.
9 - I went to my test VM and install "setup_132.exe"
10 - I then launch patch.msp and get the following dialog. "Error reading from file: c:\documents and settings\<name>\Application Data\<company>\Client\install\EC09755\Client\CDI.IndexCard.dll. Verify the file exists and that you can access it."

While the dll doesn't exist, the file ClientSetup.msi does exist in the directory it's looking for the .dll. What am I doing wrong? I told it not to delete the extracted MSI.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Patch fails with "Error reading from file"

Hello,

Are there any custom actions using the "CDI.IndexCard.dll" file? If so, the file does not exist at the time the custom action tries to access it.
Other than that, I'm not sure what the issue could be. Could you send us a sample project (including any project dependencies) to support at advancedinstaller dot com so we can build and test it?

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
invalidptr
Posts: 79
Joined: Thu Nov 18, 2010 7:10 pm

Re: Patch fails with "Error reading from file"

I figured out my problem. Or at least I got it working.

Media -> Media -> Archive installations files using LZMA compression for smallest package size.

This setting does not work. Changing it to the following does work:

Media -> Media -> Archive installation files into CAB files
Used the default settings:
- Compress CAB files for smaller size
- One CAB archive containing all the installation files

Is LZMA compression not support with Patches?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Patch fails with "Error reading from file"

Hi,

LZMA is supported by patches. We tested this scenario on our machines and the installation files remain extracted in the specified folder. I'm not sure why they are removed by your installer. If you can reproduce this behavior on a clean machine, can you please send us the .AIP (project) file you are using to support at advacendinstaller dot com so we can investigate it?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
invalidptr
Posts: 79
Joined: Thu Nov 18, 2010 7:10 pm

Re: Patch fails with "Error reading from file"

Thanks, I'll send my project along. Some more clues...

During step 2, at the "Ready to install" dialog, I see the full directory structure mentioned in Step 10. After the file install, at the "Finish" dialog, I see the structure gone and replaced with the Setup.msi file.

My setup in step 2 is an .exe. What would you expect in my EC09755 directory in step 10? I only have a single file - my setup.msi file (note: not the .exe). There error message in step 10 seems to think there should be a directory there Client. Is that a clue to my problem?
invalidptr
Posts: 79
Joined: Thu Nov 18, 2010 7:10 pm

Re: Patch fails with "Error reading from file"

The problem now is when I use the CAB method, running my patch.msp in my test VM with the original setup.exe laid down I get the following dialog from Windows Installer "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 current upgrade patch."
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Patch fails with "Error reading from file"

Hi,
My setup in step 2 is an .exe. What would you expect in my EC09755 directory in step 10?
If you are using LZMA compression, the folder should contain all the packed files. After further investigations we found that this behavior is caused by a bug in the enhanced UI bootstrapper. If you disable enhanced UI, the files are no longer removed. A bugfix will be included in the next version. Thank you for bringing this to our attention.

If you want, we can provide a release candidate as soon as a fix is implemented.
I get the following dialog from Windows Installer "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 current upgrade patch."
This message is shown when the original installation is not detected by Windows Installer. Are you receiving any errors or warnings when building the patch? If not, can you please try testing this on a clean machine?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
invalidptr
Posts: 79
Joined: Thu Nov 18, 2010 7:10 pm

Re: Patch fails with "Error reading from file"

Thanks Cosmin, I should maybe break this into a new thread 'cuz I'm starting to have two separate issues in my effort to get patching working.

Having gone down the CAB route and getting the message that Windows Installer isn't detecting the original install is very strange. My thoughts:
- I have a VMware virtual machine that I always rollback to a clean state for my testing.
- I can see my program in Add/Remove Programs before I begin the patch.
- Even after switching from LZMA to CAB I still follow the 10 step process outlined in my start of this discussion.
- At this point I've done this so many times that during the "New Patch Project Wizard" (which until I get a flow that works I delete the old one and create a new one every time) I press next for every dialog except the selection of the "Patch Images". Is there something in one of those steps that's important for old setup detection? ...other than just informative (telling the user what it is, etc.).
- The build log says the patch was built successfully.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Patch fails with "Error reading from file"

Hi,

The original installation should be detected if you are meeting the patch rules. I'm not sure what happens in your case. Can you please send us the project files for the target and upgraded package and for the patch to support at advancedinstaller dot com so we can investigate them?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
IB85lb
Posts: 27
Joined: Tue Oct 12, 2010 10:02 am

Re: Patch fails with "Error reading from file"

hi
i use AD 8.0 have the same error but the different in my problem is that it was working good from a month and i was creating patches and they are work good with out errors .
now when i create the new patch for 2011 it give me the same error i check all that u said about it it same all OK, when i install the msi source and install the patch its work perfect so the problem is in exe file.any solutions???
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Patch fails with "Error reading from file"

Hello,

This is caused by a bug in Advanced Installer. My colleague is confirming the issue in this post after the first quote.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”