Hello guys! I needed to perform some actions based on detected PnP devices. So for example when wifi is detected, it will automatically install required software etc... Maybe someone will find it useful, so I will post it. PnPBased.vbs: 'PnP based actions 'Martin Zugec '22.6.2005 Set objShell = Wscript.CreateObject("Wscript.shell") Set objWMIService = GetObject("winmgmts:root\cimv2") Set arrayPnP = objWMIService.InstancesOf("Win32_PnPEntity", 48) strInstallPath = Left(WScript.ScriptFullName,Len(Wscript.ScriptFullName) - Len(WScript.ScriptName + "n")) & "\" For Each strPnP in arrayPnP ' Wscript.Echo strPnP.PnPDeviceID Select Case Trim(Lcase(strPnP.PnPDeviceID)) Case Trim(Lcase("pci\ven_8086&dev_4223&subsys_10218086&rev_05\4&39a85202&0&18f0")) 'Instalace wifi od Intelu objShell.Run strInstallPath & "\WiFi\Intel\setup.exe -b -s", 1, True End Select Next PnPBased.bat (this is for viewing all PnP identifiers + names in system) WMIC path win32_pnpentity get name, PnPDeviceID /format:htable > PnP.html start PnP.html