Help with Listing users in Domain and Local Machine - InstallService.gif (0/1)

  • Thread starter Thread starter Mark Hollander
  • Start date Start date
M

Mark Hollander

Hi All,

I am trying to write a application that will help with the
insallutil.exe to install a windows service.


What I am trying to do is generate a list of users from the Domain
that the user belongs to as well as a list of users from the local
machine.

Does anyone have or know where I can get example code to generate this
list

I have attached a screen shot that I hope will make this request
clearer

Thank You
Mark Hollander


Thank you
Mark Hollander
 
Mark,
I don't have a specific example.

Have you looked at the System.DirectoryServices namespace? It has objects
that you can use to query Active Directory, where you should be able to get
your list of Domains & users.

I would start with the DirectorySearcher class.

Hope this helps
Jay
 
Mark,
It might, try it.

Did you check the help on the DirectorySearcher class?

http://msdn.microsoft.com/library/d...ectoryServicesDirectorySearcherClassTopic.asp

It indicates that Windows NT 4.0 is a supported platform. Further it has
links to samples & further information on how to use it!

http://msdn.microsoft.com/library/d...onIntroductionToADSIObjectsInVisualStudio.asp

Reading this second link it suggests you can search LDAP, WinNT, NDS, or
NWCOMPAT.

As I stated I would start with (reading) the (information on the)
DirectorySearcher class! As I do not have a specific example. However! The
above links appear to include both information & samples that you will need!

Hope this helps
Jay
 
just a side note, when you write a windows service, the installutil.exe is
intended for development purposes. I have seen articles which state it
should not be referenced in a setup .exe

kapcreations
 
Back
Top