Patching without patching - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

bvelke
Posts: 67
Joined: Fri Jun 10, 2011 6:36 am

Patching without patching

Is it possible to create a patch that applies changes to most files but completely replaces a specific file (i.e., without trying to patch it)?

In the alternative, is it possible to omit the one file in question from the patch altogether?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Patching without patching

Hello,

If you need to upgrade a file with the same name, then patches can do that. Usually a patch consists of the differences between the two versions. Removing the old file version and then installing the new file version is the usual behavior of a major upgrade.

Here are the rules to be considered when applying a patch.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bvelke
Posts: 67
Joined: Fri Jun 10, 2011 6:36 am

Re: Patching without patching

As far as I can tell, my application qualifies for all of the conditions of a patch.

But it is possible for my users to modify some of the files that I distribute with the original installation (e.g., a spell checker dictionary). If I try to update that file (overwriting the user's customizations), then the Updater will find that the original baseline on that file no longer exists. Will it skip that file or will the entire patch fail in that case?

I've used other patch engines that allowed me to specify certain files that should be overwritten in full regardless of the baseline (e.g., a 2 Meg dictionary file) without having to distribute the full (46 Meg) installer or "major upgrade". I guess you're saying that I can't do that.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Patching without patching

Hello,

Advanced Installer uses the Windows Installer patch engine.

Let me give two examples so you can understand how this works:

Example 1
- Version 1.0.0 installs "dictionary.txt" file on the target machine
- you then create Patch Version 1.0.1 from Version 1.0.0, upgrading "dictionary.txt" file but keeping its component GUID
- after installing Patch Version 1.0.1, "dictionary.txt" file will be upgraded accordingly on the target machine

Example 2
- Version 1.0.0 installs "dictionary.txt" file on the target machine
- you then create Patch Version 1.0.1 from Version 1.0.0, upgrading "dictionary.txt" file but keeping its component GUID
- user edits and replaces "dictionary.txt" file in Version 1.0.0 install location on the target machine
- when installing Patch Version 1.0.1 it will fail to upgrade "dictionary.txt" file

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bvelke
Posts: 67
Joined: Fri Jun 10, 2011 6:36 am

Re: Patching without patching

Uh, so in both cases I keep its component GUID. If I change its component GUID, will it cause that file to be treated as a new file and installed by overwriting the file that has the same name but a different component GUID?

I think perhaps I will just avoid patches <g>.

Thanks.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Patching without patching

Hi,
If I change its component GUID, will it cause that file to be treated as a new file and installed by overwriting the file that has the same name but a different component GUID?
This operation breaks one of the patching rules as described in the article I linked in my first reply on this thread. If any of the rules in that list are not kept, the patch will fail.

Patching is indeed a delicate upgrade method and requires careful settings. Here are a couple of more articles you may find revealing:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
http://www.advancedinstaller.com/user-g ... patch.html

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”