1

I am using Python 3.9.12 and using wmi package. I am trying to retrieve Model name of the mouse and keyboard for my tool. Whenever I am using wmi.Win32_PointingDevice() or wmi.Win32_Keyboard() in order to get the model name; I am getting USB Input Device or Standard system devices.

When I am using the following code, it is opening the GUI for devices and printers. Is there anyway to get the data without opening the GUI? I want the model name of the mouse and the keyboard.

import win32api
import win32con

win32api.WinExec('{0}\\control.exe printers'.format(win32api.GetSystemDirectory()),win32con.SW_NORMAL)

In control panel I can see the model of my mouse and keyboard mentioned.

enter image description here

JosefZ
  • 28,460
  • 5
  • 44
  • 83
Marie
  • 11
  • 1
  • Welcome to Stackoverflow! The formatting of your question seems to be broken. Please check! – Markus May 26 '22 at 10:22

0 Answers0