如何检测Windows KN/K/N版本

发布于 2024-11-27 17:00:10 字数 348 浏览 5 评论 0原文

Delphi Xe, Win7x64

如何检测不完整的Windows版本N或K(Win XpSp3-Win7x64)?没有IE,Wmp。

例子:

Function isWinKNedition:bool;
begin
result:=?????
end;

...

procedure TForm1.FormCreate(Sender: TObject);
begin
if isWinKNedition then begin showmessage('This program can work only on full versions OS Windows');Halt;end;
end;

Delphi Xe, Win7x64

How to detect incomplete Windows edition N or K (Win XpSp3-Win7x64)? Without IE, Wmp.

Example:

Function isWinKNedition:bool;
begin
result:=?????
end;

...

procedure TForm1.FormCreate(Sender: TObject);
begin
if isWinKNedition then begin showmessage('This program can work only on full versions OS Windows');Halt;end;
end;

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

够钟 2024-12-04 17:00:10

根据 MSDN,您可以使用 GetProductInfoWMI Win32_OperatingSystem 类(请参阅 OperatingSystemSKU 说明)来检测“N”个版本。请注意,Windows XP 不支持这两种方法(需要 Vista 或更高版本)

要检测 Windows XP“K”版本,您可以检查注册表项,请参阅 http://support.microsoft.com/kb/922474(对 Windows 注册表部分的更改)。

According to MSDN you can use either GetProductInfo or WMI Win32_OperatingSystem class (see OperatingSystemSKU description) to detect "N" editions. Note that both methods are not supported by Windows XP (requires Vista or above)

To detect Windows XP "K" editions you can check registry key, see http://support.microsoft.com/kb/922474 (Changes to the Windows registry section).

双手揣兜 2024-12-04 17:00:10

尝试使用GetVersionEx WinApi,它提供有关操作系统的版本信息,包括ServicePack信息。

查看这篇文章

Try using the GetVersionEx WinApi, it provides version information about the operating system including ServicePack info.

check this article

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文