Announcement

Collapse
No announcement yet.

Active directory check

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Active directory check

    Hi All,

    Sorry for my ignorance,... This could be a very basic question, but I need help from u guys ......

    I have an exe which does extend the AD schema with 2 attributes and adds a new menu item to the admin context menu ...

    Before editing the schema, I need to check whether AD is installed on the machine.

    Can anyone help me how to check this programatically from a C# code ?

  • #2
    Re: Active directory check

    You could use the File.Exists method to look for

    %SystemRoot%\ntds\NTDS.DIT Which is the AD database.

    Code:
    [C#]
    public static bool Exists(
    stringpath
    );
    http://msdn.microsoft.com/en-us/libr...ts(VS.71).aspx
    Caesar's cipher - 3

    ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

    SFX JNRS FC U6 MNGR

    Comment


    • #3
      Re: Active directory check

      Unless the NTDS.DIT is moved to an other location
      Marcel
      Technical Consultant
      Netherlands
      http://www.phetios.com
      http://blog.nessus.nl

      MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
      "No matter how secure, there is always the human factor."

      "Enjoy life today, tomorrow may never come."
      "If you're going through hell, keep going. ~Winston Churchill"

      Comment

      Working...
      X