-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUSB-synchro.py
More file actions
38 lines (28 loc) · 739 Bytes
/
USB-synchro.py
File metadata and controls
38 lines (28 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- coding: utf-8 -*-
"""
Created on Sun Dec 12 00:56:37 2021
@author: SDA
"""
import wmi
import os
"""
c = wmi.WMI()
wql = "Select * From Win32_USBControllerDevice"
for item in c.query(wql):
print(item.Dependent.Caption)
"""
#PNPDeviceID ->
#SERIAL NUMBER is included in PNPDeviceID
#☺print("*" * 50, "N° SERIE")
USB2 = "0415060924000134"
USB1 = "045FF1106101356315932123"
def Usbfinder():
if USB1 in DevicesId:
print("USB1 by SN: {} is connected". format(USB1))
else:
print("USB1 by SN: {} is NOT connected". format(USB1))
if USB2 in DevicesId:
print("USB2 by SN: {} is connected". format(USB2))
else:
print("USB2 by SN: {} is NOT connected". format(USB2))
Usbfinder()