如何检测Windows KN/K/N版本
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据 MSDN,您可以使用 GetProductInfo 或 WMI 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).
尝试使用
GetVersionEx
WinApi,它提供有关操作系统的版本信息,包括ServicePack信息。查看这篇文章
Try using the
GetVersionEx
WinApi, it provides version information about the operating system including ServicePack info.check this article