Enable / disable specific USB port?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Elaphe666
Posts: 131
Joined: 28 Nov 2015, 11:39

Enable / disable specific USB port?

10 Dec 2018, 10:23

Can AutoHotkey or any other program enable and disable a specific USB port. My idea is to have a USB fan connected to one of the ports of a USB hub and be able to control it from my computer. Thank you.
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: Enable / disable specific USB port?

10 Dec 2018, 12:45

Although it's possible to logically disable a USB root hub or perhaps individual ports, which would prevent devices from being detected. The fan is probably not a true USB device, but merely uses the USB's power line. The lines between ports maybe have some polarity protection, but aren't usually shut off or controlled. So turning the PC on or having a powered hub connected puts power on them, which keeps the fan on.
Elaphe666
Posts: 131
Joined: 28 Nov 2015, 11:39

Re: Enable / disable specific USB port?

10 Dec 2018, 17:13

Yeah, the fan only uses the USB power, so it's not detected in any way by the OS or the computer. I guess it's impossible then to start or stop it with a software solution. If that was not the case, this could be done with USBDEVIEW, which also works in the command line, so it can be integrated into a AHK script.
garry
Posts: 3770
Joined: 22 Dec 2013, 12:50

Re: Enable / disable specific USB port?

10 Dec 2018, 17:20

I have an USB-hub with a illuminated switch to each usb port ... ( I like hardware :) )

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 142 guests