如何阅读域名信息?

时间:2018-04-15 15:18:49

标签: windows ui-automation autoit

我需要使用AutoIt从sysdm.cpl中读取域名信息。我可以启动控制台。

域信息的类值(使用AutoIt Window Information Tool获得)为#32770

Run("control.exe sysdm.cpl,,4")

enter image description here

1 个答案:

答案 0 :(得分:2)

这适用于域和工作组:

Local $oWinNT = ObjGet("WinNT:")
For $oDomain In $oWinNT
    ConsoleWrite($oDomain.Name & @CRLF)
Next

我找到了使用WinAPI NetGetJoinInformation的更详细(更快)的解决方案。