I created an easy way to enable/disable one of the mice attached to my computer. When VirtualBox is running, that mouse is captured within VB (for my daughter to play with). However, when VB isn't running, I don't want that mouse interfering with my mouse, so I created a batch file to enable and disable it using Microsoft's devcon utility. Unfortunately, the legal way to get it is to download the huge WDK (Windows Driver Kit).

My wife's new HP Envy, which has Windows 8.1, doesn't have a way to disable its touchscreen or touchpad. So I wanted to use a variatoin of my script to do that as well. (In the end, I got the script to work for the touchscreen, but not the touchpad... which is run by a different kind of driver so needs a different method).

Under Windows 8, this worked in a simple batch file:

    devcon.exe enable "USB\VID_046D&PID_C501"

 

I did not even need to elevate to admin priveleges for that to enable/disable the mouse.

I updated to 8.1 last night and the batch file stopped working. Using the same batch file, devcon SAYS it enabled the device (below), but the mouse was actually NOT enabled if I tried to move it around (and vice versa if I enabled it in Device Manager and then tried to disable via devcon... it did not disable). I could enable/disable perfectly fine in the Device Manager GUI.

    USB\VID_046D&PID_C501\5&3514F6C9&0&1                        : Enabled
    1 device(s) are enabled.

 

I made sure I was using the x64 version of devcon on my x64 Windows 8.1. I tried doing it as elevated to admin rights as well as not elevated (both for the batch file and devcon itself). I also tried it in a few different compatibility modes.

I googled and googled and did not find anyone else having an issue with devcon on 8.1 and all of the example I saw matched what I was already doing.

I decided to read through the help screen again, and I saw the restart command. Once I put it after the enable/disable command, it started working. Finally.

    devcon.exe enable "USB\VID_046D&PID_C501"
    devcon.exe restart "USB\VID_046D&PID_C501"

 

The restart command requires elevation to admin rights. So I created two shortcut files to the batch file (one to enable and one to disable) and set the shortcuts to run as administrator. And then I use the shortcuts to run the batch file.
 
Tags

Traffic Question 15: Mailing a letter

Traffic Question 15:

During a period of heavy traffic, you want to mail a letter and then head in the direction of the pink arrow. How do you do it?

  1. Stop at Mailbox A, then do a U turn
  2. Park in a spot near Mailbox A, then turn left out of the parking lot
  3. Use Mailbox A, then use the left turn lane at the intersection to do a legal U turn
  4. Turn right at the main street, turn left into the parking lot for Mailbox B, then go through the intersection in the desired direction

Traffic Question 14: A traffic light turns yellow and you’re not quite going to make it through before it turns red... what do you do?

Traffic Question 14:

A traffic light turns yellow and you’re not quite going to make it through before it turns red... what do you do?

  1. Stomp on the gas pedal and zoom through
  2. Continue through the intersection without any change in speed
  3. Wait until the last second and then stomp on the brake
  4. Start coming to a gradual stop immediately
  5. None of the above

Traffic Question 9: If you get a phone call while you’re driving, what do you do?

traffic-09q.pngTraffic Question 9: If you get a phone call while you’re driving, what do you do?

A. Answer it right away

B. Wait until you get to a stop light and call back.

C. Stop at a stop sign and call back.

D. See who it is. If you think it might be an emergency, park the car in a designated parking area and then call back.

(Yes, this is pretty similar to #2 If you get a text while you’re driving... The main difference is, texting on the phone is illegal whereas talking on the phone is legal. At least in Moline.)

Traffic Question 12: Which of the following are factors in whether or not a vehicle is going to be slower than normal?

Traffic Question 12:

Which of the following are factors in whether or not a vehicle is going to be slower than normal?

* Car is Buick, Cadillac, or similar type

* One or more children are present

* Vehicle is a minivan

* Age of driver is over 60

* Handicapped license plates

* Driver is using cell phone

* Vehicle is a "sporty" color

* Driver is female

Traffic Quiz 6: Is it possible to back out of a driveway and use only one lane?

traffic-06q.pngTraffic Question 6:

The blue dots indicate the path used to pull IN the driveway.

Is it possible to back out of a driveway and head in the direction indicated by the pink arrow, using only one lane of the road?

A. No, one lane is not enough room.

B. Yes, it can be done in one lane.