How do I get information whether the system is configured as domain controller or not programatically on windows.
Asked
Active
Viewed 727 times
2 Answers
2
You can avoid the HKLM read, GetVersionEx
's OSVERSIONINFOEX.wProductType
will equal VER_NT_DOMAIN_CONTROLLER

Alex K.
- 171,639
- 30
- 264
- 288
1
Examine the registry key HKLM\SYSTEM\CurrentControlSet\Control\ProductOptions\ProductType. A domain controller will have the value LanmanNT. LINK

Carey Gregory
- 6,836
- 2
- 26
- 47