Monday, January 23, 2006

Managed Desktop Wallpaper Idea

I had an idea while I was walking to the hospital to get a diet coke that I need to get down here...
The idea is to create a web handler (.ashx) that you would set as the active desktop wallpaper on the desktop of your systems that you manage. The handler would use windows integrated authentication to obtain a WindowsPrincipal for the logged in user. The logged in user has rights to browse the WMI classes on their own box, so this should work okay. As long as the user is logged on to the domain, and the web server is on the domain, this would work. The handler would use the Request.ServerVariables to get the IP number of the requesting box, then formulate a WMI query to go out and grab the WMI classes that you want from the user's box. It uses impersonation (as them) to do this. Then you'd go and build a JPEG or PNG out of the pieces of the WMI classes you fetched to display stats about the box to the user. This would be a way to make customized wallpaper showing the system's NetBIOS name, the logged in user name, or other stuff to the user on each system. Once you built the image, you'd base 64 encode it and spit it out to the "browser."

Here is some junky proof-of-concept code that the impersonation doesn't really work on yet...
string ipnum = Request.ServerVariables("REMOTE_ADDR");
ConnectionOptions conn = new ConnectionOptions();
conn.Impersonation = ImpersonationLevel.Impersonate;
ManagementPath mp = new ManagementPath("\\\\" + ipnum + "\\root\\cimv2");
ManagementScope ms = new ManagementScope(mp, conn);
ObjectQuery wmquery = new ObjectQuery("select * from Win32_OperatingSystem");
ManagementObjectSearcher searcher = new ManagementObjectSearcher(ms,wmquery);
ManagementObjectCollection rc = searcher.Get();
foreach (ManagementObject mo in rc)
{
//build an image based on the info in the result and then return it...
string infostring = "OS:" + mo["Caption"].ToString();
//etc... stuff to build the image
}

There's No Comedy Here...

"Looking for Comedy in The Muslim World" should have been called "Albert Brooks' Idea of Comedy is Telling Indian People That he Was Nemo's Dad." That or "Failing Miserably." I want my $5.50 back.

Sunday, January 22, 2006

Good Film/Horrible Film

I went to go see "The New World" (Terrence Malick's fifth film) this weekend. It was great! Q'Orianka Kilcher, Christian Bale and Christopher Plummer were all really great, but the star of the film was the cinematography and sound. Malick's films always look great. I highly recommend this one.

On the other hand, don't waste your time with "Underworld: Evolution" - it sucks. I went hoping it would be as good as the first one, which was not bad. Unfortunately, the complete lack of any cool Bill Nighy (not the Science Guy) scenes, combined with a horrible script, terrible editing, poorly choreographed fight scenes, stupid underdeveloped characters and inexplicably vague and confusing pseudo-eastern european locations make for a stinker that not even Derek Jacobi could save. Spend your eight bucks on The New World or Munich.

Friday, January 20, 2006

Mindless "Eco-Friendly" Policies

The other day, I woke up to the sound of my clock radio playing this story on NPR. The short of it is, some cities are letting people who drive Hybrid cars park for free or reduced rates. That's pretty funny considering these supposedly 50 MPG cars typically get 34-42 MPG when driven normally. Meanwhile, the anti-diesel mass social retardation that has afflicted the US market since the big three destroyed the public image of diesel cars in the 70s prevents you from buying a car in a CARB state that actually gets 45 miles per gallon. My Jetta TDI actually gets 42 MPG combined city/highway, on crappy winterized Diesel fuel! Unlike the hybrids, this is better fuel economy than advertised, and it gets better fuel economy the harder it is driven. Plus it is fun to drive, and the turbo propels you up mountains through rarefied air with ease. I would hate to drive a battery-boosted hybrid up a mountain. The batteries go dead and then you are stuck hauling dead batteries up to 10,000 feet on an already underpowered engine breathing thin air.

The argument that diesels are dirty is no longer true with the advent of clean-burning efficient small diesel engines and biodiesel.

Meanwhile, diesel passenger cars, the cleanest diesels of them all, are banned from sale in CARB states and are not eligible for tax benefits, free parking or clean/commuter lane privileges in most areas in which these benefits are given to status symbol hybrids that don't even get better fuel economy than their standard drivetrain cousins in real-world driving.

Salt Lake City, get a clue.

OMG Frist Psot!

This is my lame first post. I am going to put stuff on this blog- it might be interesting, and it might not be.