furrfu
01-10-2002, 09:30 AM
Knowing a remote computer's IP number, IP name, and NetBIOS name ... How can I determine the remote computer's operating system?
Most PCs (99%) in my network are Win9x, Nt4, and Win2000. I would like to poll the network and determine how many installations of each operating system exist.
Ales Zigon
01-10-2002, 12:14 PM
Maybe you can use GetVersionEx API.
This is from API guide:
Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
Private Sub Form_Load()
Dim OSInfo As OSVERSIONINFO, PId As String
'KPD-Team 1998
'URL: http://www.allapi.net/
'KPDTeam@Allapi.net
'Set the graphical mode to persistent
Me.AutoRedraw = True
'Set the structure size
OSInfo.dwOSVersionInfoSize = Len(OSInfo)
'Get the Windows version
Ret& = GetVersionEx(OSInfo)
'Chack for errors
If Ret& = 0 Then MsgBox "Error Getting Version Information": Exit Sub
'Print the information to the form
Select Case OSInfo.dwPlatformId
Case 0
PId = "Windows 32s "
Case 1
PId = "Windows 95/98"
Case 2
PId = "Windows NT "
End Select
Print "OS: " + PId
Print "Win version:" + str$(OSInfo.dwMajorVersion) + "." + LTrim(str(OSInfo.dwMinorVersion))
Print "Build: " + str(OSInfo.dwBuildNumber)
End Sub
You'll probbably have to modify some stuff.
divil
01-11-2002, 03:05 AM
GetVersionEx is for the local computer, you can't just modify it to run on a remote computer.