So, this happened a while ago, but it keeps poppin up, so I thought I’d write about it. So, many people as cool as I…many people whose coolness poorly approximates Greatness, would not post about this out of pride, while I am the essence of Greatness, I am also beyond this pride thing…somehow. Anyways, I was having a VERY weird issue, and I was trying to ensure that nothing other than a script I was testing was running, b/c it appeared to me that something was stealing my mouse events…so I removed many environment variables (not only for this reason, but also b/c I had polluted it with entries that seemed to piss each other off such as 3 versions of MSVC and various MS platform SDKs (none of this was for fun, it was all part of my arduous [odious?] endeavor to compile XULRunner with PyXPCOM), so anyways, I got rid of many of the entries (all but like python’s path) in my Path variable… turns out none of this was the issue.
If ever you are running some console app/script and are having mouse events randomly hijacked…this may be your issue:
If QuickEdit Mode is enabled, or if you have turned Mark on for the open shell (right-clicking on the shell’s title bar and going to properties will show you a checkbox indicating the status of QuickEdit Mode, and if the cursor is not a blinking underscore, that is, if it is a box blinking, and the box should be the full height of a line in the shell, then Mark is on) this will steal your mouse events! This seems obvious with me near-perfect hindsight, but I enabled this by default b/c it never cause me any problems, and I frequently needed to copy/paste out of the shell, so I didn’t even think about it being there when I was having troubles with my program.
Anyways, I was running a batch file that checked for installation of Python 2.5 by doing something like reg query "HKLM\SOFTWARE\Python\PythonCore\2.5" and it was failing even though python is installed…well, reg wasn’t recognized as a program b/c blah\blah\system32 wasn’t in my Path…d-oh!
*edit: I didn’t include this earlier b/c I didn’t have permission, but now that I’ve met him in person, and asked… Steve Lee is the cool guy who got XULRunner built against PyXPCOM and whose batch file I was running