Updating an existing installation - copying only changed files

59 views
Skip to first unread message

Marian Kechlibar

unread,
Dec 12, 2025, 5:45:36 AM (7 days ago) Dec 12
to innosetup
Hello,

I have an installer with a few dozen files, and, during an update, I would like to check checksums of existing files vs. files in the installer before overwriting the currently installed files.

This would help us especially with the Windows drivers, which change only rarely, every N years or so, but sometimes are blocked by the system from being updated. 

If this wasn't possible, is it possible to version individual files in the installer and compare versions of files in that case? The core of the problem is still the same - not to overwrite files unless necessary.

The documentation says that comparison of timestamps is unreliable and should only be used as last resort.

Thank you in advance

Marian

Bill Stewart

unread,
Dec 15, 2025, 2:21:31 PM (3 days ago) Dec 15
to innosetup
On Friday, December 12, 2025 at 3:45:36 AM UTC-7 Marian Kechlibar wrote:

I have an installer with a few dozen files, and, during an update, I would like to check checksums of existing files vs. files in the installer before overwriting the currently installed files.

This would help us especially with the Windows drivers, which change only rarely, every N years or so, but sometimes are blocked by the system from being updated. 

If this wasn't possible, is it possible to version individual files in the installer and compare versions of files in that case? The core of the problem is still the same - not to overwrite files unless necessary.

One way might be to use the preprocessor to get the file hashes during the compilation stage.

Here's a potential solution I wrote a few years ago:


Martijn Laan

unread,
Dec 16, 2025, 12:38:17 AM (3 days ago) Dec 16
to innosetup
Hi,

Op 12-12-2025 om 09:53 schreef Marian Kechlibar:
This would help us especially with the Windows drivers, which change only rarely, every N years or so, but sometimes are blocked by the system from being updated. 

Don't these Windows drivers have version numbers? That should make sure they aren’t updated when there is no update, because the default behavior is to not replace an existing file with the same version number.

Greetings,
Martijn

Marian Kechlibar

unread,
Dec 16, 2025, 6:10:15 AM (3 days ago) Dec 16
to innosetup
Hmm. The .inf file contains a version, which hasn't changed since 2022: 

[Version]
   Signature   = "$Windows NT$"
   Class = NetService
   ClassGuid = {4d36e974-e325-11ce-bfc1-08002be10318}
   Provider    = %ProviderString%
   CatalogFile = CCEDdrvr.Cat
   DriverVer = 10/31/2022,14.23.36.519

I am therefore not really sure if the problem happens during an attempted copy/overwrite, or during the following action:

[Run]
;Always executed steps as Admin
Filename: "{sys}\RunDll32.exe"; Parameters: "syssetup,SetupInfObjectInstallAction DefaultInstall 132 {sys}\Drivers\CCEDdrvr.inf";
Filename: "Net"; Parameters: "Start CryptoCult_EncryptionDesktop_Driver";

Maybe this operation fails when the driver is busy...

There is a version compiled into the driver as well, right? I mean the binary .sys file. How do I check it? Maybe there is a mismatch between the version in the driver and the version in the.inf file.

Which of the versions is used by InnoSetup for comparison? The one compiled in, or the one in the inf file?
Dne úterý 16. prosince 2025 v 6:38:17 UTC+1 uživatel Martijn Laan napsal:

Martijn Laan

unread,
Dec 16, 2025, 7:49:16 AM (3 days ago) Dec 16
to innosetup
Hi,

Op 16-12-2025 om 12:10 schreef Marian Kechlibar:
There is a version compiled into the driver as well, right? I mean the binary .sys file. How do I check it?

The compiler log shows version numbers when it encounters them, as long as you're not telling it to ignore versions by specifying flags ignoreversion or external

You can also see version numbers by right clicking a file in Explorer, going to its properties and then to tab Details.

Greetings,
Martijn

jeff weir

unread,
Dec 17, 2025, 8:56:08 PM (2 days ago) Dec 17
to innosetup
Not the one in the .inf file.

Eivind Bakkestuen

unread,
Dec 18, 2025, 9:53:55 PM (2 hours ago) Dec 18
to inno...@googlegroups.com
The .inf file is just one file, while each driver binary can have a separate version compiled in. It is therefore very likely that InnoSetup looks at each individual file (and anyway, that is what the docs are saying that it does).

On Thu, Dec 18, 2025 at 11:56 AM jeff weir <weir...@gmail.com> wrote:
Not the one in the .inf file.

Which of the versions is used by InnoSetup for comparison? The one compiled in, or the one in the inf file?

--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/innosetup/22289f9f-2487-40d6-b657-aca03547c498n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages