SkillAgentSearch skills...

Pysetupdi

Python SetupAPI Wrapper

Install / Use

/learn @gwangyi/Pysetupdi
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

pysetupdi

Python SetupAPI Wrapper

devices function generates iterable of Devices which is selected by given parameters. The parameters of devices is similar to SetupDiGetClassDevs. Properties of each device can be accessed by accessing pre-defined properties or giving DevicePropertyKey object as an index to device object.

hard_disk_drives = devices('{4d36e967-e325-11ce-bfc1-08002be10318}')
for hard_disk_drive in hard_disk_drives:
    print(hard_disk_drive.device_desc)

You can also query information about devices by console command

C:\> pysetupdi -g {4d36e967-e325-11ce-bfc1-08002be10318} list
C:\> pysetupdi -i "SCSI\DISK&VEN_SAMSUN_&PROD_MZNTE256HMHP-000\4&103D1686&0&000000" get pdo_name
View on GitHub
GitHub Stars13
CategoryDevelopment
Updated9mo ago
Forks6

Languages

Python

Security Score

82/100

Audited on Jul 7, 2025

No findings