Ermittelt, ob es sich um ein 32 oder ein 64 Bit OS handelt
Private Function getOsArchitecture(ByVal Computer As String) As String
Dim objWMIService As Object
Dim objItems As Object
Dim objItem As Object
GetOsArchitecture = ""
objWMIService = GetObject("winmgmts:\\" & Computer & "\root\CIMV2")
objItems = objWMIService.ExecQuery( _
"SELECT * FROM Win32_OperatingSystem")
For Each objItem In objItems
getOsArchitecture = objItem.OSArchitecture
Next
objWMIService = Nothing
objItems = Nothing
objItem = Nothing
End Function
Kommentare zum Snippet