Saturday, November 24, 2012

Pain with Windows Continues

I admit that I seriously lack in-depth knowledge of Microsoft Windows, but this one still looks ridiculous never-the-less.

I am trying to hook up a ViewSonic gTablet to a Windows XP machine to load a ROM. Upon plug in the USB cable, Windows recognized the new device and popped up the Found New Hardware Wizard. All seems smooth sailing, until the wizard seems to stuck at copying a file.


Of course, when I check the destination folder, the file is there. The copying is already done but the Wizard just sits there twiddling its thumb, forever and ever. I can't even cancel it as the buttons are all greyed out. It only goes away and declares that it has finished installing the software for the device when I unplug the USB cable or power off the device.

Yet, when I plug the device back in, it is not functioning properly as an APX device. The properties dialog box in the Windows Device Manager says that "No drivers are installed for this device."

So the next thing I try is to remove the device from the Device Manager. Windows stuck again:


I guess I am going to try Linux.

[Edit 2012-11-25] -- I thought if Linux was to help, I would write another post titled "Linux to the Rescue" or something. But Linux made it so easy which made me question myself as why I started with Windows in the first place -- Possibly because most of the how-to type articles mention Windows. Well, anyway, I found this article on SlateDroid.com and followed its instructions to nvflash the tablet, which is basically, plug in the device using a mini USB cable, download nvflash, download the device image you want to install on the device and run the nvflash script -- not worth writing another post.

Friday, November 23, 2012

Windows Registry is Evil

I have heard from colleagues who worked in end user support, that Windows registry was a source for many problems. But this one that just bit me int he rear is evil.

I have an old Asus EeePC running Windows XP. It was setup initially as a box to automatically logon. I wanted to give it to my kid to carry around. So I needed to turn off the auto logon. Googling "Windows XP auto logon", I found this Microsoft article titled "How to turn on automatic logon in Windows XP". So I went ahead and found the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon". I then removed the DefaultUserName entry, assuming that would be enough to disable auto logon.

Upon reboot, however, Windows popped up an error message which is quickly covered with the Windows startup screen. It seemed to just hang there. The mouse cursor moved, but Ctrl-Alt-Del did not do anything. I rebooted it a couple of times by pressing on the power button. I got distracted for a while and come back to find Windows actually timed out from whatever it was doing.

One wouldn't have thought Windows would behave like that with removing one single value from the registry. But I guess this just shows that I have not messed around in the Windows registry enough.

I ended up downloading the Microsoft Fixit program in the How to page linked above. That did work to turn off auto logon for me. Otherwise, I guess I would have to break out my Windows XP CD, go into recovery console mode, find a registry backup and restore it. That would have been the last straw to break it for me to replace this Windows installation with Linux.

Monday, November 12, 2012

Sharing the Pain from IE

I just complained to a colleague, after he spent some time helping me with an issue in Microsoft Internet Explorer 8, that Microsoft wanted to conquer the world. They did it, but with whole truck loads of manure, piled up high in everybody's backyard. Now we are left to clean up all that smelly stuff.

The issue is that, the hospital has some legacy applications that run only on IE. We finally got to IE8 not too long ago after a relatively brief encounter with IE7, which was after a long tiring adventure with IE6. But some applications still require IE7. So the standard issue browser on everyone's desktop is IE8 running in IE7 compatibility mode. Web based applications that I have worked on usually are used by technical people so I usually could care less if something works in IE or not.

The latest project involves a dashboard for the non-techies, including executives, which means we are not allowed to bring a tool not sanctioned by the enterprise, such as Firefox. Fortunately, we have another colleague who has dealt with IE quite extensively. He provided information that was priceless to us, with a caveat: The tricks he gave us may or may not work. At least he had not been able to get them all to work.

The one trick is to force IE8 to render HTML as IE8, rather than in IE7 compatibility mode. There are three ways to do that:
  1. Change Compatibility View Settings in IE8: That function is listed in Tools menu. One just needs to check off the Display Intranet sites in Compatibility View.
  2. Add a meta tag in the HTML document head part:
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  3. Add an item in the HTTP response header: x-ua-compatible: IE=Edge
#1 is a non-starter because it requires manually configuring the browser.

#2 worked for my colleague right away in one of his applications. So he gave me the information to try out in my code.

It didn't work!

After a number of frustrating trials, every single time clearing IE8 cache, closing the browser, open the browser again and checking the rendering mode, etc., with no luck whatsoever, we decided to try #3.

That worked.

At this point, I am too lazy to bother with the changes in previous trials. So I still don't know if #3 alone or the a combination of #2 and #3 made it work. I am just glad that it works.