我如何读取从Windows使用C#的“公司名称”? [英] How do I read the 'company name' from Windows using C#?

查看:160
本文介绍了我如何读取从Windows使用C#的“公司名称”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有些程序读取您在安装Windows时输入的公司名称,并在程序中。如何做到这一点?难道他们只是从注册表中读取的名字吗?

Some programs read the company name that you entered when Windows was installed and display it in the program. How is this done? Are they simply reading the name from the registry?

推荐答案

如果你想注册公司名称输入到注册表中,你可以得到它:

If you want the registered company name as entered in the registry, you can get it from:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOrganization

使用注册表类,你可以做沿着这些路线的内容:

Using the Registry class you can do something along these lines:

string org = (string)Microsoft.Win32.Registry.GetValue(@"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion", "RegisteredOrganization", "");

这篇关于我如何读取从Windows使用C#的“公司名称”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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