Wednesday, 18 January 2006, 9:26:28 EST

I haven't been very lively lately. A particular R.E.M. song sort of gets my recent mood; it is more extreme than my actual mood but it is similar. Any way, that is the reason there haven't been any posts recently — apathy. That is also why I haven't finished my gallery script. I got to the point where I need to parse sub-albums and just haven't felt like writing the code to do it. Plus, classes have started and the ones I am taking are not easy and are very time consuming.

Having said that bunch of garbage, I have a small rant to vent in Hewlett-Packard's general direction. I don't have a scanner, so I use one that is available in Student Software Support Services on campus. It is an HP ScanJet. Since it is a USB scanner I just plug it into my laptop and scan directly to my computer. Well, the scanner, being an HP product, isn't so simple to use where that is all I have to do to use it. I had to download a 50MB driver package, which comes with way more software than anyone needs, just to be able to scan with the scanner. I've had this stuff installed on my computer for a couple semesters now because I like to scan in my graded assignments and tests for future reference. That way I don't have to keep stacks and stacks of paper. When I first installed the software, it placed an application in my dock that automatically started every time I logged in. I quickly got rid of that; I don't want crap software starting up that I use only occasionally.

Thinking I was done with that, I went on my merry computing way until I need to track down a rogue process and noticed that the damn thing was still running on start up! It seems that HP really wants their "HP ScanJet Manager" to run all the time after it is installed. Evidently, the application just waits for buttons to be pressed on the scanner so it can intercept their signals and do fancy "one button scan" garbage. As I write this, it is using almost 7% of my processor's time to do absolutely nothing. In other words, HP installed a constant battery drainer on my computer. I finally got fed up enough with this program today to track down how I can prevent it from starting. There are a lot of old posts, one or two years old, on the internet that say to remove it from either a) "/Library/StartupItems" (which I didn't know existed) or b) your user profile startup items under system preferences. If the application were installed in "/Library/StartupItems" I would be able to delete it from that location and all would be well. If it were in my user profile, it would be as simple as highlighting the entry and clicking a remove button. Neither is the case.

Some time in the past couple of years (so it seems), Hewlett-Packard got crafty. They found an API called AutoLaunchedApplicationDictionary in Apple's Core Foundation classes. How did I figure this out? It wasn't too simple. There is no information, that I have been able to find, on the internet about this. First, I had to find the "HP ScanJet Manager" application since it isn't installed in a typical "startup location". Spotlight to the rescue! Using Spotlight from a finder window, I was able to find the application in "/Library/Application Support/Hewlett-Packard/HP Scanjet/Scanner". This directory contains three files: the offending program, an XML data file, and an application to install the offending program to the system startup items. Using strings I found a reference to the aforementioned API; this gave me something to search for. The API can be, and should be, used to write to a user's login preferences which would add a listing to the startup items in the user's profile. The API writes to an XML data file called "loginwindow.plist" in the user's "~/Library/Preferences" directory (well, that is the file the programmer should write to any way). Of course, since the program doesn't show up in the user's profile preferences, HP didn't write to this file. No, HP decided it would be better to write to "/Library/Preferences/loginwindow.plist", effectively hiding the application from any user on the machine and making it startup no matter who logs in. Those tricky bastards!

So, if you find yourself having to install this software, and you don't want their damn "ScanJet Manager" program running all the time, be sure to delete "loginwindow.plist" from "/Library/Preferences". That is, if the HP software is the only software referenced in the XML file. In my case, it is and deleting the file won't harm anything. If there were more references than just the HP stuff, it would probably be better to edit the file and remove the HP references. Hopefully this helps others with the same problem.


very cool!

Posted by John Richardson on Sunday, 05 March 2006, 12:25:39 EST.

Those tricky bastards indeed! Thanks!

Posted by Patrick on Wednesday, 18 April 2007, 7:19:39 EDT.

This was so helpful. Man! I am glad I found this info!

Posted by okenter on Tuesday, 24 April 2007, 20:41:02 EDT.

I'm glad you guys found the information useful. HP really needs to get with it. This kind of stuff is so frustrating for the consumer.

Posted by James Sumners on Wednesday, 25 April 2007, 7:47:06 EDT.

Wow, over a year later and this still comes in handy. Thanks for the process.

Posted by Simon on Wednesday, 16 January 2008, 8:04:54 EST.

I found that in the "Property List Editor" utility, you can just uncheck the processes you don't want (assuming that you do indeed have more than just HP items in there). I have unticked them and will restart and I have a good feeling about it. Thanks very much! :-)

Posted by David on Friday, 28 August 2009, 12:47:19 EDT.

Excellent tip. Thank you for sharing it.

Posted by James Sumners on Saturday, 29 August 2009, 10:17:57 EDT.