mctozzy
Posts: 81
Joined: Wed Feb 14, 2007 7:37 am

Patch rollback problem

I have recently upgraded to Ent version and have been testing out the patching functionality, and have come across a problem which is a windows installer issue, but you may be able to shed some light on it.

I have a versioned exe in my base package. In the installer project, I duplicate this exe into the same folder with a different name. That all works fine.

Now I create a later version of the exe, rebuild the msi, and generate a patch between the new one and the original. I apply the patch. Both the original exe and the duplicated one are replaced as I would expect.

Now I go into Add/Remove programs, and remove the patch. The patch appears to remove successfully. The original EXE is back-levelled to the original version. However, the duplicated one is left at the later version. This is a problem!

Is there another way I should do the file dupl so that this problem does not occur? I suppose I could duplicate the actual exe outside of the install project but that seems a bit clumsy and I'd rather not do that.

Thanks,
Milt
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

I managed to reproduce this behavior on my test computer. It seams that the "RemoveDuplicateFiles" standard action (which deletes files installed by the DuplicateFiles action) is not executed when the patch is removed (duplicated file not removed).

When a repair is done to restore the older files the duplicated file remains intact since its version is greater that the version of the older file.

This is related to the Windows Installer behavior and also I think this is a bug.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
mctozzy
Posts: 81
Joined: Wed Feb 14, 2007 7:37 am

So can you raise a bug on Microsoft then?

And in the mean time, what would you suggest we do...duplicate the file using a script action instead? (So that at the end of any install a copy is made of whatever version the exe is as at)
mctozzy
Posts: 81
Joined: Wed Feb 14, 2007 7:37 am

Workaround

We think we've come up with a good workaround without having to resort to custom actions and scripts.

Given that for whatever reason the RemoveDuplicateFiles action isn't getting invoked at patch rollback time, it would appear the workaround is to add a File Remove action on the same file that is being duplicated, so that any time the file is duplicated, it is deleted first. That way, it will always get reliably back levelled when a patch is removed.

This may look like a contradiction in the AI project, but the key is that the remove always gets done earlier than the duplicate operation.

I still think you should raise this as a bug with Microsoft.

Cheers...
Radhika_Shankar
Posts: 9
Joined: Thu Oct 10, 2024 7:03 am

Re: Patch rollback problem

Advanced Installer project built in version 21.4 works fine, but the same project built in version 22.0 causes the installer to roll back. Please check and response asap. I tried to attach both .aip but getting size exceeds error. I tried replicating all the custom actions and files/folders as same as in older version, but still it is not working. Please assist
Liviu
Posts: 1325
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Patch rollback problem

Hello,

Not sure why this happens.

To assist us in conducting a thorough investigation of this issue, we kindly request that you send us the following resources via email to support at advancedinstaller dot com:

1. the .AIP (setup project) files saved with v21.4 and v22.0.
2. an installation log.
3. a download link to your setup packages built with the above versions.

You can upload them anywhere and send us the download link or send us an e-mail and we can send you an upload link to our servers.

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

Return to “Common Problems”