0

Here is the code that i use to reach for remote registry :

    private void getAllOdbc(string pc)
    {
        RegistryKey regKey;

        regKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.CurrentUser, pc.ToString(), RegistryView.Registry64).OpenSubKey("SOFTWARE\\ODBC\\ODBC.INI\\ODBC Data Sources");
    }

I would like to access to the remote registry with a specific user that has the permission to the remote computer.

When i launch this windows form application from my own computer, it works because i am already logged in with this specific user that has permission on the remote computer, but i will have to use this application on other computers that are not logged in with this specific user.

So i would like to insert in my code something that will tell my application to access the remote registry with this specific user, like this anyone can use my application without been logged with this specific user.

I already permitted the Remote Registry services on the remote computer.

4

1 回答 1

0

您可能必须让您的线程模拟用户,然后才能在远程主机上打开他们自己的注册表数据。

于 2012-06-15T21:29:50.407 回答