TaskTrayApplication Crash

Do you get an annoying “TaskTrayApplication” crashed or some such warning when Windows 7 boots?  I did too.  Finally took a minute to track it down and it turns out to be HP’s Toner Cartridge Authentication program. I’m pretty sure this program does little more than spy on you, so just remove it from Control Panel -> Uninstall a Program and the problem will go away.

BTW, why are huge tech companies like HP unable to maintain extranets with normal-looking URLs for human beings?  Having to surf through pages like http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?&objectID=c02632486 is ridiculous.

Windows log file rotation

Yet another de facto Linux command that is oddly missing in Windows.

Some simple log files from a custom app were getting out of control. Google revealed that while basic rotation is possible for the standard Windows event logs, there’s no command in particular for log rotation, aside from some odd looking bat scripts that required typing output to temp directories and the like.

Tried rotatelogs.exe from the Windows distribution of Apache 2.2, but that didn’t seem to work at all.

Today, however, I stumbled across CHOMP. Works a peach, and surprisingly quick. Recommended.

(BTW, looks like the author has his own implementation of tail as well. Maybe this is the replacement for Cygwin tail that I was looking for last August..  Update:  It don’t work so well.)

Remote Desktop over SSH

For a simple and free (and fairly standard!) way to secure your remote desktop sessions — and without having to figure out the crazy, proprietary Microsoft security stuff — take a look at copSSH. copSSH uses a streamlined Cygwin client to setup an SSH sever on your Windows box.

I’ve recently been using copSSH and PuTTY‘s Pageant authentication agent to tunnel RDP through PuTTY/copSSH SSH connections. Works like a charm.

One gotcha: copSSH doesn’t clean-up after itself well. Consider running taskkill from time-to-time.

C:\WINDOWS\Taskkill /F /IM bash.exe /T

Or if you prefer bashing:

$ kill -9 ps | grep ^I.*bash$ | cut -c2-9

Accrue more than 64 zombied PTYs and you’ll find yourself locked out of the server.

Screen Rulers

For one reason or another I’m always measuring images and other screen real estate in web pages or elsewhere. This recently got a lot easier when I discovered the MeasureIt add-on for Firefox. (Which fits snugly next to ColorZilla, the equally useful in-browser color picker.)

The “elsewhere” part has remained difficult until recently when I stumbled across the Wonderweb Screen Ruler. I find that I will leave it open and on top of the screen for easier use when working with graphics in web apps.

Truly a ruler of rulers.

Just can’t get good tail…

At least not when doing Windows.

I’ve tried a couple of free GUI-esque applications for tailing logs on Windows servers, but none of them have really panned out. Tail for Win32 is fine for small log files, but stops working when you get into the multi-megabyte log range. Plus it has a creepy icon.

mTAIL looks good, but returns a frightening “Unknown Publisher” error in Windows 2003. Same for the free version of Bare Metal’s tail, WinTail.

MakeLogic (motto: “We are excited that MakeLogic is delivering” — Microsoft. What?) has a Java Tail that also looks promising, but is still clunky and gives random ArrayIndexOutOfBounds errors.

And then there are the for-fee version like BareTail, Hoo WinTail, HPS WinTail, and Tail4Win. All seem very nice… but then, I don’t pay for tail.

So ultimately I’m back to good old tail -f via Cygwin (which I swear didn’t used to work). I understand that the Windows Server 2003 Resource Kit Tools provide similar functionality; however if I’m going to catch tail from the command line, I need to do it from bash.

Passive FTP on IIS6

Lately I find myself wading through a lot of IIS-related issues and the IIS6 FTP server has been driving me crazy.

I’ve never really worked with IIS before. Given Microsoft’s bent to make things as simple as possible, I’m surprised at the amount of time I have to spend figuring out basic configuration issues. The various Microsoft GUIs contain no way to set a passive FTP port range, or even a range of ports in Windows Firewall for that matter.

I’d originally assumed that I could just add the FTP server .exe to the list of exceptions in the firewall Exceptions tab: This way any ports that the server opened would be automagically accepted by Windows. From the running services it appears that Inetinfo.exe is the FTP server, or at least encapsulates an FTP service along with other services. An article here tells me that adding Inetinfo.exe to the list of exceptions would be rather naughty, so I have resorted to the tedious, manual means of configuring and opening passive FTP ports. I wonder if there’s a real FTP server binary somewhere in there that I could make an exception.

Anyway, the manual process in a nutshell…

  1. Set some passive ports in the IIS Metabase:
    C:\Inetpub\AdminScripts\adsutil.vbs set /MSFTPSVC/PassivePortRange "5000-5010"
    (note that you cannot explicitly tell IIS to use active or passive.. it wants to figure that out for itself based on the available ports and what the ftp client is requesting)
  2. Open same ports in Windows Firewall:
    FOR /L %%I IN (5000,1,5010) DO NETSH FIREWALL ADD PORTOPENING TCP %%I FTPPort%%I
  3. Restart IIS:
    iisreset
  4. Go back to doing more productive things.

Unless you have a lot of people FTPing in and out of your server, ten or so open ports should work.

Thanks to New Age Digital for their straightforward article on this. Some may also want to read the Slacksite article, the definitive explanation of Active/Passive FTP.