tags:

views:

87

answers:

1

I tried to access xp to vista system manually, its working,but programatically how to do it ?

like,by selecting view workgroup computers in network tasks and click one computer in workgroup computers.it shows connect to "system name" window, contains username and password if i enter username and password.the seleted computer will able to access in registry otherwise i can't able to access that selected system.

how to do this manual process in vb.net coding? is it possible or not?

please help me

A: 

You can use OpenRemoteBaseKey to access the remote registry but before that you need to impersonate an account with the correct access rights using WindowsIdentity.Impersonate.

The following MSDN link contains a complete sample to login as a different user programmatically: http://msdn.microsoft.com/en-us/library/system.security.principal.windowsimpersonationcontext.aspx

ho1
Thank u,To access vista system,OpenRemoteBaseKey is not working.then how to impersonate an account in vista os remotely
meenakshi
The MSDN link contains a sample application that tells you how to impersonate another account that has access to the remote computer so you have to do that first and then call OpenRemoteBaseKey.
ho1
THANK U,Its working.Is it possible by giving system name or ip address only
meenakshi
I'm not sure if it works with IP Address, but otherwise just use GetHostEntry to get the name as in: System.Net.Dns.GetHostEntry("127.0.0.1").HostName
ho1
how to get username,password of remote systems? (vista and xp),Is it possible? Please help me
meenakshi
Hopefully you already have a username and password of an account on the remote system otherwise you have to ask the owner of that system to provide them to you.
ho1
how to get os version of remote computer using computer name or ip address?
meenakshi
You might want to start new questions to get better answers, but a short answer would probably be to look into WMI.
ho1