The good news: It's probably not Calibre.
The bad news: It's probably part of Windows, specifically the Windows Installer (introduced for Windows 2000 and the architecture has remained the same since, making it about 120 in internet years). I had this exact problem with 7.14 and 7.25 on both Windows 10 and Windows 11 machines — and was able to fix it quickly.
The not-so-bad news: Many of these errors (especially error codes 2502 and 2503) happen when the installer (msiexec.exe) doesn't correctly synchronize its idea of the machine state with the actual machine state. And it doesn't require a reinstallation of the installer, just reregistering it and
immediately rebooting.
First, close all programs (including social media!), and preferably close your internet connection.
Open a command window with administrator privileges, from the context menu if you're set up that way or otherwise Win-S, search for "cmd", then select "run as administrator". (The Win-R method doesn't always work.)
Type the following commands in, hitting the [Enter] key after each line:
Quote:
msiexec /unreg
msiexec /regserver
|
Now close the command window and
immediately reboot (because you absolutely, positively do not want some background process trying to update.)
After the reboot is complete and you've logged back in, retry the failed installation.