Hey there, thanks for your reply, looks like I managed to suss it out, I just put the Cancel argument in before the OK stuff happens. :)
Now if only I could have that input box inline with the MsgBoxes, it always pops up too high and I added , x300, y300 but that didn't change a thing.
Also, I need to research the whole Next loop thing, that one confuses me.
Dim intResponse, strComputer
intResponse = MsgBox("Welcome to My Terrific and Exciting OS Information Tool!", vbInformation + vbOKCancel, "OS Information Tool")
If intResponse = vbCancel Then WScript.Quit
If intResponse = vbOK Then
strComputer = Inputbox("Input the name of the remote computer or just click OK (or hit Enter) for this computer.", "OS Information Tool")
End If
If strComputer = "" Then
strComputer = "."
End If
Dim objWmiService : Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\"& strComputer & "\root\cimv2")
Set colOSes = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
Set colSMBIOS = objWMIService.ExecQuery("Select * from Win32_SystemEnclosure")
For Each objOS in colOSes
For Each objSMBIOS in colSMBIOS
MsgBox "Computer Name: " & objOS.CSName & vbCrLf _
& "Caption: " & objOS.Caption & vbCrLf _
& "Version: " & objOS.Version & vbCrLf _
& "Build Number: " & objOS.BuildNumber & vbCrLf _
& "Build Type: " & objOS.BuildType & vbCrLf _
& "OS Type: " & objOS.OSType & vbCrLf _
& "Service Pack: " & objOS.ServicePackMajorVersion & vbCrLf _
& "Serial Number: " & objSMBIOS.SerialNumber, vbInformation + vbOK, "OS Information Tool"
Next
Next