Dim objQuery As New ObjectQuery("SELECT * FROM Win32_operatingsystem")
Dim searcher As New ManagementObjectSearcher(objQuery)
Dim caption As String = ""
Dim osa As String = ""
Dim spmv As String = ""
Try
For Each mem As ManagementObject In searcher.Get
caption = mem("Caption").ToString()
spmv = mem("ServicePackMajorVersion").ToString()
[b]osa = Runtime.InteropServices.Marshal.SizeOf(GetType(IntPtr)) * 8 & "-Bit"[/b]
Next
Catch
End Try
'Console.WriteLine("Caption: " + My.Computer.Info.OSFullName)
'Console.WriteLine("ServicePackMajorVersion: " + spmv)
'Console.WriteLine("OSArchitecture: " + osa)
'Console.WriteLine()
Console.WriteLine(caption + " " + osa + " SP" + spmv)
Console.Read()
'Console.WriteLine(caption & " " & osa + " SP" & spmv)
Das funktioniert besser! :)