Using RegistryKey.OpenRemoteBaseKey on a non-Domain computer

J

Jerry Spence1

I am trying to get registry information from another PC that is not part of
a domain.I have tried the following:

Dim key = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine,
\\computername).OpenSubKey("Software").GetSubKeyNames

and this works OK, but it must be because I have the same username and
password on both machines. I can't find any options for specifying the
remote username/password when using OpenRemoteBaseKey.

Any ideas?

-Jerry
 
R

rowe_newsgroups

I am trying to get registry information from another PC that is not part of
a domain.I have tried the following:

Dim key = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine,
\\computername).OpenSubKey("Software").GetSubKeyNames

and this works OK, but it must be because I have the same username and
password on both machines. I can't find any options for specifying the
remote username/password when using OpenRemoteBaseKey.

Any ideas?

-Jerry

I think you might need to use impersonation to "pretend" to be another
user before calling this. Do some searching in this newsgroup's
archives to turn up some links on how to use impersonation.

Thanks,

Seth Rowe
 
J

Jerry Spence1

rowe_newsgroups said:
I think you might need to use impersonation to "pretend" to be another
user before calling this. Do some searching in this newsgroup's
archives to turn up some links on how to use impersonation.

Thanks,

Seth Rowe
Thanks Seth. I've tried looking but (so far), they all make references to
domains. I'll keep looking.

-Jerry
 
J

Jerry Spence1

Jerry Spence1 said:
Thanks Seth. I've tried looking but (so far), they all make references to
domains. I'll keep looking.

-Jerry
I've found some impersonation code that (sort of) works, and I created a
user on the other PC called freddy but when I tried impersonating freddy, my
identity was actually MyPC/GUEST. I'm wondering if there are some tweaks I
need to do to allow me to log on as freddy.

-Jerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top