确定正版Windows安装在C# [英] Determine Genuine Windows Installation in C#

查看:126
本文介绍了确定正版Windows安装在C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想确定用户是否有正版Windows副本,我怎么能做到这一点在C#?我可以整合 Windows Genuine Advantage的

If I wanted to determine if a user had a genuine copy of windows, how could I do that in C#? Can I integrate with Windows Genuine Advantage?

推荐答案

在我回答这个问题,我在回答的提问者的语言(C#)的范围内。作为另一个回答者指出,有一种方法可以做到这一点在其他语言,但它是依赖于平台(Vista和以上的,从我所看到的)。

Update

When I answered this question, I was answering in the context of the asker's language (C#). As another answerer pointed out, there is a way to do this in other languages, but it's platform dependent (Vista and above, from what I can see).

据我所知,有一个WGA(尚真)没有可用的API文档,并且由于黑客可以想见,(和有)打破WGA通过了解它的内部,我怀疑微软将开辟WGA的API

As far as I know, there is no API documentation available for WGA (still true), and since hackers could conceivably (and have) break WGA by knowing its internals, I doubt Microsoft is going to open up an API for WGA.

微软对C一个单独的API ++和COM发展论坛为<一个href="http://stackoverflow.com/questions/1552392/determine-genuine-windows-installation-in-c/1552434#1552434">this答案指出,但没有在.NET框架,我可以看到。

Microsoft has a separate API for C++ and COM developement as this answer points out, but nothing available in the .NET Framework that I can see.

实际上,没有充分的理由来发现这一点。这不是程序的企业知道,如果是合法安装操作系统。

Realistically, there's no good reason to find this out. It's not the business of the program to know if the OS is legally installed.

留下我的答案了,因为我无法将其删除;但如果你想使用的Win32 API 并没有留在.NET框架里面,我建议使用<一个href="http://stackoverflow.com/questions/1552392/determine-genuine-windows-installation-in-c/1552434#1552434">this回答。

Leaving my answer up since I cannot delete it; but if you want to use Win32 API and don't have to stay inside the .NET Framework, I suggest using this answer.

这篇关于确定正版Windows安装在C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆