访问远程计算机上的 %appdata% .NET openremotebasekey
我正在尝试访问远程计算机上用户的“AppData”。我拥有所需的所有权利。我尝试了这个:
r = RegistryKey.OpenRemoteBaseKey(RegistryHive.Users, MachineName)
r.OpenSubKey(SIDValue & "\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders")
AppData = r.GetValue("AppData")
事实上,它检索我自己的appdata文件夹...实际上,远程计算机上的帐户的SID值和我的帐户的SID值是相同的(我在一个域下)。我不知道这是否是我获得自己的 appdata 文件夹的原因。
我应该如何进行?
当我浏览 HKEY_Local_Machine 时,我设法获得有关远程计算机的信息。但在浏览 HKEY_USERS 时则不然。
I am trying to access the "AppData" of a user on a remote computer. I have all the rights needed. I tried this:
r = RegistryKey.OpenRemoteBaseKey(RegistryHive.Users, MachineName)
r.OpenSubKey(SIDValue & "\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders")
AppData = r.GetValue("AppData")
The fact is that it retrieves my own appdata folder...Actually the SID Value of the account on the distant computer and on mine is the same (I am under a domain). I don't know if it is the reason why I get my own appdata folder.
How should I proceed?
When I browse the HKEY_Local_Machine, I manage to have information about the remote computer..But not when browsing HKEY_USERS.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己找到了答案,谢谢...
对于那些对如何执行此操作感兴趣的人,我是这样做的:
由于浏览 HKLM 确实给了我良好的数据(远程计算机上的数据),我只是搜索了 HKLM\Software\ 中的 systemroot 值Microsoft\Windows NT\CurrentVersion。
检索应用程序数据的方式如下:
然后,对于 Windows XP:
对于 Windows 7:
I found the answer myself, thanks...
For those who are interested into how to do this, here is how I did:
As browsing through HKLM did give me the good datas (the ones on the remote computer), I just searched for the systemroot value which is in HKLM\Software\Microsoft\Windows NT\CurrentVersion.
Retrieving the appdata is done that way after:
Then, For Windows XP:
For Windows 7: