https://github.com/heaths/msiverca-rs
Windows Installer custom actions to get real version information
https://github.com/heaths/msiverca-rs
Last synced: 8 months ago
JSON representation
Windows Installer custom actions to get real version information
- Host: GitHub
- URL: https://github.com/heaths/msiverca-rs
- Owner: heaths
- License: mit
- Created: 2023-01-07T20:30:58.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-10T22:12:44.000Z (over 3 years ago)
- Last Synced: 2025-05-26T06:58:08.704Z (about 1 year ago)
- Language: Rust
- Size: 26.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Windows Installer Custom Actions for Real Version Information
[](https://github.com/heaths/msiverca/releases/latest)
[](https://github.com/heaths/msiverca/actions/workflows/ci.yml)
Windows Installer properties like `VersionNT` cannot be used for Windows versions newer than 8.1 because the APIs on which they rely lie about the version.
In fact, if you look in any recent Windows Installer verbose log, you'll see that AppCompat is also changing version information:
```text
MSI (c) (8C:20) [10:29:03:529]: APPCOMPAT: Uninstall VersionNT override found.
...
Property(C): VersionNT = 603
```
With even `VerfiyVersionInfo` deprecated in Windows 10, a custom action is needed to call into the kernel to get the correct version information.
This will also return separate properties for better, more intuitive version comparisons than what `VersionNT` or `VersionNT64` will support.
## Properties
The examples below are based on Windows 11 22H2.
Name | Description | Example
---- | ----------- | -------
VER_WINDOWS_MAJOR | The major version of Windows | 10
VER_WINDOWS_MINOR | The minor version of Windows | 0
VER_WINDOWS_BUILD | The build version of Windows | 22621
You can reference these in conditions for immediate custom actions, including those to schedule deferred custom actions
since the properties are declared as secure custom properties and passed from client to service.
## License
Licensed under the [MIT](LICENSE.txt) license.