evansullivan Posted February 28, 2020 Posted February 28, 2020 I need to read the computer description of the local computer. Looking around I see a lot about reading from AD, I don't need that. Just the local computer description. Thanks!
Subz Posted February 28, 2020 Posted February 28, 2020 (edited) You can try WMI for example: Local $oWMIService = ObjGet("winmgmts:\\" & @ComputerName & "\root\cimv2") If Not IsObj($oWMIService) Then Exit Local $oInstances = $oWMIService.ExecQuery("Select * from win32_operatingsystem") If IsObj($oInstances) Then For $oInstance In $oInstances ConsoleWrite($oInstance.Description & @CRLF) Next EndIf Actually remembered you can get this from Registry as well Local $sDescription = RegRead("HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters", "srvcomment") MsgBox(4096, "Computer Description", @ComputerName & " = " & $sDescription) Edited February 28, 2020 by Subz evansullivan 1
evansullivan Posted February 28, 2020 Author Posted February 28, 2020 Man I didn't think to get it from the reg. I was thinking there was a "built in" way to grab it. Thanks!!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now