Category Archives: hacks

How to Show Removed Devices in Device Manager

Admit it, sometimes you uninstall hardware without removing the driver first. Sometimes the hardware just dies and Windows makes it “go away.” The problem is, the driver and configuration are still there, and if you were using the default Microsoft drivers, there’s no visible way to uninstall those.

Here’s a workaround:

  1. Obtain an administrative command prompt (Start|All Programs|Accessories, right click on Command Prompt and click Run as Administrator)
  2. At the command prompt, type or paste:
    set devmgr_show_nonpresent_devices=1
  3. Then type:
    devmgmt.msc
  4. This will pop up a normal-looking Device Manager, in the menu of which click View|Show Hidden Devices
  5. Expand the relevant part of the tree and (with care) uninstall away!

Gmail “Safe Mode” – Log In with Labs Disabled

This morning, on first attempting to connect to gmail using  Chrome 4.0.223.16, I began experiencing this message:

You have been signed out of this account.

This may have happened automatically because another user signed in from the same browser. To continue using this account, you will need to sign in again. This is done to protect your account and ensure the privacy of information.

Upon clicking okay, I was immediately logged out of my account. Clearing cache worked to log in once, but the problem recurred upon subsequent log out-log in cycles. Per this thread at Google support, the answer was to start gmail in “safe mode” with labs disabled using this url:

http://mail.google.com/mail/?labs=0

From there, I went into settings and turned off the “Super Stars” lab, though other users have reported the problem from other labs as well.

Update: The problem recurred, even with “Super Stars” turned off, so I disabled all Labs.

Remote Desktop when all Terminal Services Connections are in Use

This comes up more often than we’d like. And while I’d love Microsoft to fix this and allow unlimited Remote Desktop connections to a server, it doesn’t seem like it’s going to happen. If you get the dreaded “The terminal server has exceeded the maximum number of allowed connections” message, here’s how you can force connect and boot someone else:

Mstsc /v:192.168.0.x /admin /F

It used to be /console instead of /admin, but that went away in XP SP3.

But let’s be clear on what the real fix here is: Microsoft needs to release the 2-user limit on administrator connections for servers that are never going to be used as interactive applications servers. If I’m setting up a new web server or SQL server, there’s no reason I shouldn’t be able to have three or five or 10 administrators logged in at once.

Can I Has Layout?

Just got bitten by the IE7 (or IE8 “compatability view”) has layout bug yet again, so posting it…

Basically, in the IE7/IE8cv you can only check .clientHeight on elements where hasLayout==true. If your clientHeight is always returning 0, chances are you don’t have layout. The easiest way to get layout? Set display=”inline-block”. Per:

http://bytes.com/groups/javascript/564442-ie-clientheight-problem

And that article points to this one, which is pretty much the definitive source (top Google hit!):

http://www.satzansatz.de/cssd/onhavinglayout.html

height:1% is what I ended up using to make a resizable div “hasLayout.”

display: inline-block makes the div not size to the window horizontally, which didn’t work for my purpose.

I tried using overflow:hidden, but that doesn’t help in IE6.