How To Programmatically Disable

Table of contents:

How To Programmatically Disable
How To Programmatically Disable

Video: How To Programmatically Disable

Video: How To Programmatically Disable
Video: Enable / Disable WiFi Programmatically - Android Studio Tutorial 2024, May
Anonim

Sometimes there are situations when you need to disconnect any equipment connected to the computer. But looking for the right cable among the many similar wires or getting to the surge protector is not always convenient. Opening the case of the system unit and disconnecting the cables is also not an option. Especially when there are seals on the body of the cabin in which the computer was assembled. In such cases, some of the equipment can be turned off by software.

How to programmatically disable
How to programmatically disable

Instructions

Step 1

Call the "System" component. This can be done in several ways. Option one: Click the Start button in the lower left corner of your screen or the Windows key on your keyboard. Select "Control Panel" from the menu. Enter the "Performance and Maintenance" category and click on the "System" icon with the left mouse button.

Step 2

Method two: being on the "Desktop", right-click on the item "My Computer". In the drop-down menu, select the "Properties" item by clicking on it with the left mouse button. A new System Properties dialog box will open.

Step 3

Go to the "Hardware" tab in the window that opens and click on the "Device Manager" button in the "Device Manager" group. This action will bring up an additional window, which lists all the hardware identified by the computer. The data is presented in the form of a tree-like directory.

Step 4

Select from the list the equipment that you want to turn off and click on its name with the right mouse button. In the drop-down menu, select the "Disable" item from the suggested commands. To the system request “Disconnecting the device means that it will stop working. Disconnect the device? " answer in the affirmative.

Step 5

Alternatively, open the device properties window by double-clicking the left mouse button on its name. In an additional window that opens, go to the "General" tab and select "This device is not in use (disabled)" using the drop-down list in the "Device application" group.

Step 6

Click on the "OK" button for the new settings to take effect. The device will be disconnected. It will be displayed as a crossed out device icon in the tree directory. To reactivate the equipment, repeat all steps, changing the value in the corresponding field to "Enabled".

Recommended: