‘**********************************************************************************************************************************
‘**********************************************************************************************************************************

Set WSHShell = WScript.CreateObject("WScript.Shell")

‘**********************************************************************************************************************************
‘Declaracion de variable SO para comparar Sistema Operativo de la máquina

SO = WshShell.RegRead("HKLMSoftwareMicrosoftWindows NTCurrentVersionProductName")
SOVer = WshShell.RegRead("HKLMSoftwareMicrosoftWindows NTCurrentVersionCSDVersion")
‘**********************************************************************************************************************************
‘Verificación tipo de equipo

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\.rootcimv2")
Set colChassis = objWMIService.ExecQuery("SELECT * FROM Win32_SystemEnclosure")
For Each objChassis in colChassis
   For  Each strChassisType in objChassis.ChassisTypes
       Select Case strChassisType
           Case 1
            PCTYPE = "Other"
            Exit For          
           Case 2
            PCTYPE = "Unknown"
            Exit For       
           Case 3
            PCTYPE = "Desktop"
            Exit For       
           Case 4
            PCTYPE = "Low Profile Desktop"
            Exit For       
           Case 5
            PCTYPE = "Pizza Box"
            Exit For       
           Case 6
            PCTYPE = "Mini Tower"
            Exit For       
           Case 7
            PCTYPE = "Tower"
            Exit For       
           Case 8
            PCTYPE = "Portable"
            Exit For       
           Case 9
            PCTYPE = "Laptop"
            Exit For       
           Case 10
            PCTYPE = "Notebook"
            Exit For       
           Case 11
            PCTYPE = "Handheld"
            Exit For       
           Case 12
            PCTYPE = "Docking Station"       
            Exit For           
           Case 13
            PCTYPE = "All in one"
            Exit For
           Case 14
            PCTYPE = "Sub-Notebook"
            Exit For       
           Case 15
            PCTYPE = "Space Saving"
            Exit For
           Case 16
            PCTYPE = "Lunch Box"
            Exit For
           Case 17
            PCTYPE = "Main System Chassis"
            Exit For
           Case 18
            PCTYPE = "Expansion Chassis"
            Exit For
           Case 19
            PCTYPE = "Sub-Chassis"
            Exit For
           Case 20
            PCTYPE = "Bus Expansion Chassis"
            Exit For
           Case 21
            PCTYPE = "Peripheral Chassis"
            Exit For
           Case 22
            PCTYPE = "Storage Chassis"
            Exit For
           Case 23
            PCTYPE = "Rack Mount Chassis"
            Exit For
           Case 24
            PCTYPE = "Sealed-Case PC"
            Exit For
           Case Else
            PCTYPE = "Unknown"
            Exit For
           End Select
   Next
Next

If SO = "Microsoft Windows XP" Then

    If PCTYPE = "Desktop" or PCTYPE = "Notebook" or PCTYPE = "Laptop" Then

        MsgBox "Windows version: " + SO

        MsgBox "Tipo de equipo: " + PCTYPE
    End If

End If