ghacks Technology News

Turn Off Computer Hardware With A Single Click


Rarst inspired me to take a closer look at the command line utility devcon which has been created by Microsoft. Devcon is basically a command line version of the Windows Device Manager. We recently published an energy saving article that contained a tip to disable computer hardware to save power which is especially useful for mobile computer systems like laptops or netbooks.

It is possible to write a simple batch script that can turn computer hardware off. Might be a handy for users who connect their mobile computer to a power source and use it on the road as well. They would simply turn off the unnecessary computer hardware on the road and turn it on again once it is connected to a power source again.

The creation does not require programming skills but you need to know a bit about the computer hardware installed on your system. Not all hardware should be disabled, possibilities include

  • Audio Devices
  • Network Adapters
  • Wireless Networking Adapters
  • CD, DVD and Blu-Ray drives
  • Floppy drives
  • webcams, card readers and other peripherals

You need three commands to work with devcon.

  • devcon find
  • devcon disable
  • devcon enable

Start by downloading devcon from the official Microsoft website. Unpack it to a directory of your choice. It might be a good idea to put it into a directory that is listed in the system path of the operating system, e.g. /system32.

Open the Windows command line with [Windows R], [cmd], [enter].

Enter devcon find * to get a listing of all hardware devices. This can be a long list, you can use the following command to find a specific device (the command is case sensitive):

devcon find * | find "computer hardware identifier"

To find all Creative devices one could enter

devcon find * | find "Creative"

computer hardware

The device in the screenshot above would be the Creative Soundblaster X-FI sound card. To disable that sound card one would use the following command

devcon disable PCI\VEN_1102

It is enough to add the unique identifier for the hardware device. Here are some tips to make the most out of the find command:

Find all PCI devices

devcon find * | find "PCI"

Find all USB devices

devcon find * | find "USB"

All that needs to be done now is to collect the unique identifiers for all computer hardware devices that should be turned off at times.

Create a new text document on the computer, name it disable.bat. Right-click it, select edit and add as many devcon disable lines to it as you want.

devcon disable PCI\VEN_1102
devcon disable PCI\VEN_1317
devcon disable USB\VID_1532

Now create a second batch file, name it enable.bat and use the following code (you basically exchange disable with enable)

devcon enable PCI\VEN_1102
devcon enable PCI\VEN_1317
devcon enable USB\VID_1532

That’s a basic script. You could add echo commands to it, combine the two scripts into one and beatify it further. The basic script on the other hand does what it is supposed to do.




Tags: , , , , , , , ,
Categories: Windows, software



Related posts:

Save Notebook Power by disabling unneeded devices
Control Computer Hardware And Workstations In A Computer Network
Create Hardware Profiles
Enable or disable the Windows Firewall in Vista in one click
Computer Hardware Drivers List
Remove Old Windows Device Drivers
Find out which devices have been connected to your pc
Windows restarts or shows Bluescreen after installing new hardware

6 Responses to “Turn Off Computer Hardware With A Single Click”

  1. Rarst says:

    Glad you like it. :)

    I have doubts if all hardware stops consuming power if disabled. It would obviously benefit things like wireless adapters but for stuff integrated on motherboard or for PCI cards it probably won’t make a difference in power consumption.

    My opinion is saving power starts with choosing hardware, software solutions can only do as much as hardware can be bent. :)

  2. Pete says:

    I really doubt this “turns off computer hardware”. Try it with optical mice, webcams, PCI network cards and optical drives and you will find that their LEDs are still on.

    This just deactivates the OS driver, sorry to burst your article’s bubble.

    Turning off peripherals and components is a motherboard/bios feature and how to do it depends on each motherboard/bios, if it supports it.

  3. Rarst says:

    @Pete

    It doesn’t really turn stuff of but there is still difference between hardware that actively does something and hardware that just sits idle.

    For example when hard drive spins down from inactivity it is not turned off by definition but it eats much less power.

    So it is not question of it having effect but question of is effect enough to bother with it. :)

  4. Computer Rental says:

    Turning computer hardware off in just a single click can help us conserve battery power. It really doesn’t mean that it is turned off but there is a difference in the consumption of battery power. There are some steps that should be done but it is easy and can be done by anyone who are familiar to computer hardware.

Trackbacks/Pingbacks

  1. [...] more here:  Turn Off Computer Hardware With A Single Click « In Case You Missed It: The Week In News (SLIDESHOW) Healthcare: Paying for It | The [...]

Leave a Reply   Follow Ghacks   Subscribe To Comment Rss

© 2005-2009 Ghacks.net. All Rights Reserved. Privacy Policy - About Us