update: OSVERSIONINFOEX

This commit is contained in:
ema 2024-05-20 21:20:46 +08:00
parent 4bf5001a2c
commit cb75cf8338
3 changed files with 1 additions and 6 deletions

View File

@ -59,7 +59,7 @@ public static class OsVersionHelper
throw new PlatformNotSupportedException("Setup can only run on Windows.");
}
versionCache = new Version(osv.MajorVersion, osv.MinorVersion, osv.BuildNumber, osv.Revision);
versionCache = new Version(osv.MajorVersion, osv.MinorVersion, osv.BuildNumber, osv.PlatformId);
}
return versionCache;
}

View File

@ -177,7 +177,6 @@ public struct OSVERSIONINFOEX
public int MajorVersion;
public int MinorVersion;
public int BuildNumber;
public int Revision;
public int PlatformId;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]

View File

@ -1,9 +1,5 @@
using MicaSetup.Design.Controls;
using MicaSetup.Design.Controls;
using MicaSetup.Helper;
using System;
using System.ComponentModel;
using System.Windows.Media;