about computer in a domain
-
hi all, I want to display a list of computers available at that domain at runtime. So that user can select computer name from it..... Can some body tell me how to do it....... Also can i restrict this list according to some criteria. For example, this list only display the computer names which have some specific application installed( e.g dot net frame work etc. ) I need urgent help, if some body can help me, i will be very much thankful to him.
-
hi all, I want to display a list of computers available at that domain at runtime. So that user can select computer name from it..... Can some body tell me how to do it....... Also can i restrict this list according to some criteria. For example, this list only display the computer names which have some specific application installed( e.g dot net frame work etc. ) I need urgent help, if some body can help me, i will be very much thankful to him.
Hi, Put a textbox (multiline) and a button on a form, try this button click handler, as a start:
private void button1_Click(object sender, System.EventArgs e)
{
DirectoryEntry de = new DirectoryEntry("LDAP://myserver.mydomain");
DirectorySearcher ds = new DirectorySearcher(de);
ds.Filter = ("(objectClass=computer)");
foreach(SearchResult res in ds.FindAll())
{
textBox1.AppendText(res.GetDirectoryEntry().Name + System.Environment.NewLine);
}
}Cheers Phil Hobgen barbari.co.uk Southampton, UK