读取远程注册表键值
2014-04-17 20:00
218 查看
string UAC = GetRegKey("127.0.0.1", @"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "LocalAccountTokenFilterPolicy"); private static string GetRegKey(string ClientIP, string path, string key) { string result = ""; try { RegistryKey regKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, ClientIP).OpenSubKey(path); result = regKey.GetValue(key).ToString(); regKey.Close(); } catch (Exception ex) { result = ex.ToString(); } return result; }
网上的方法有误...直接坑了我一下午。
相关文章推荐
- G - Mad Veterinarian
- Cracking the coding interview--Q19.10
- 如何提高网页打开速度?
- Java程序员学习Flex和BlazeDS的十三个理由
- Roy Li的学习和成长自传
- msg邮件转eml邮件
- (android高仿系列)今日头条 --新闻阅读器 (二)
- 服务器提交了协议冲突. Section=ResponseHeader Detail=CR...的解决方案总结
- 【自习任我行】任务跟踪6
- 转:java开发的10位牛人
- MySQL实现循环插入功能
- C#创建文件目录和文件名本地化
- fatal error C1083: 无法打开包括文件:"dxtrans.h": No such file or directory
- 非递归版归并排序
- 二叉搜索树的非递归与递归遍历以及层次遍历
- div+css样式表的id和class常用命名规则
- 好看的table 样式三
- 《算法导论》笔记 第11章 11.5 完全散列
- ios学习记录 day34 UI10+ UITableView编辑
- 《算法导论》笔记 第11章 11.5 完全散列