Skip to content

Fix: Fixed issue where the Windows version was copied incorrectly #17294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Files.App/ViewModels/Settings/AboutViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Licensed under the MIT License.

using Microsoft.Win32;
using System.Runtime.InteropServices;
using System.Windows.Input;
using Windows.ApplicationModel;
using Windows.ApplicationModel.DataTransfer;
Expand Down Expand Up @@ -170,7 +169,7 @@ public void CopyWindowsVersion()
Clipboard.SetContent(dataPackage);
});
}

public void CopyUserID()
{
SafetyExtensions.IgnoreExceptions(() =>
Expand All @@ -194,9 +193,10 @@ public string GetAppVersion()

public string GetWindowsVersion()
{
return Environment.OSVersion.Version.ToString();
ulong v = ulong.Parse(Windows.System.Profile.AnalyticsInfo.VersionInfo.DeviceFamilyVersion);
return $"{(v >> 48) & 0xFFFF}.{(v >> 32) & 0xFFFF}.{(v >> 16) & 0xFFFF}.{v & 0xFFFF}";
}

public string GetUserID()
{
return GeneralSettingsService.UserId;
Expand Down
Loading