Hi, I’m currently looking to write a program, most likely in Python. Now, I have an odd question. Is it possible to limit this program to running on specific hardware? Could I prevent it from running on a computer that doesn’t have a certain piece of hardware?

Recommended Answers

All 3 Replies

Assuming it's a Windows program, you could run a WMI query to check for the presence of the particular hardware and abort if not found. Alternately, if you knew the name of the associated driver file you might, instead, check for the presence of that file.

Thank you! I think that might be just what I was looking for! Out of curiosity, is that a Windows-only thing, or is there something equivalent to a WMI query in Linux?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.