how do i get the list of local windows user on a machine.
Printable View
how do i get the list of local windows user on a machine.
Reference the System.DirectoryServices and have a look at the classes available, it should enable you to list the users in a domain. If you set the domain to "." your machine name it should list the users. Of course you'll need to be an admin on the machine to make it work.
i did not find the package / classs System.DirectoryServices in .NET 1.1 nor in .NET 2.0 please check it agian.
also refer to the attached image, i want that list somehow
Do you know the difference between referencing an assembly and importing a namespace? They are completely unrelated. I'm guessing that you were trying to import a namespace, but if you haven't referenced any assemblies in which that namespace is defined then of course it won't be visible.Quote:
Originally Posted by Mr.No
i knew that difference, i thought its reference would be included by default and got the classes in it. but still could not get what i wanted .. please check that whether the DirectoryServices can do it
A .NET project only references a few commonly used assemblies by default. AD is definitely NOT commonly used so there's no reason that it would be referenced by default.
ok i got ur point but please come back to the point and give me some help
I would if I could, but I don't know the answer to your original question.