Devices can be disabled with SetupDiSetClassInstallParams + SetupDiCallClassInstaller with DICS_DISABLE in x64
How programmatically disable the video card inserted into the PCI slot
Is it possible to programmatically disable the video card inserted into the PCI slot for a comparative assessment of the quality of the video card built into the motherboard?
4 answers
Sort by: Most helpful
-
-
Docs 15,146 Reputation points
2022-01-21T01:59:35.657+00:00 Additional options that may enable you to compare the performance of each video:
a) Turn off using the respective control panels
Nvidia Optimus
AMD Switchable graphicsb) Open the BIOS > some computers have settings that can be turned on /off
c) Modify / uninstall drivers
.
.
.
.
.Please remember to vote and to mark the replies as answers if they help.
On the bottom of each post there is:
Propose as answer = answered the question
On the left side of each post there is /\ with a number: click = a helpful post
.
.
.
.
. -
Limitless Technology 39,366 Reputation points
2022-01-21T10:03:13.907+00:00 Hello LevGorinshteyn
Yes, you can use the next:
Script for Disabling :
pnputil /disable-device "InstanceID"Script for Enabling:
pnputil /enable-device "InstanceID"To find instance ID of your discrete card you can access Device Manager in Windows and from the properties of the Adapter, Details Tab, the value is on the "Device instance path"
--If the reply is helpful, please Upvote and Accept as answer--
-
S.Sengupta 15,191 Reputation points MVP
2022-01-22T13:56:44.75+00:00 Yes, there are PowerShell scripts available. You can kindly go through the following Microsoft reference: