Date Ranges in Log Parser for EventLogs

If you need to trawl through your production server event logs. Here’s a quick tip for extracting just the entries for a given date range using LogParser. BTW Visual LogParser is a must have, it even downloads and automatically installs the latest version of LogParer from MS.

SELECT  TimeGenerated, SourceName, ComputerName, Message FROM C:\Downloads\May09-ErrorLog\AppLog\*.evt
WHERE TimeGenerated BETWEEN timestamp('04/04/2009', 'dd/MM/yyyy') and timestamp('06/04/2009', 'dd/MM/yyyy')
ORDER BY TimeGenerated desc

Making your portable hard disk work with the XBox 360

I like using my XBox as a media center. But when I plugged in a portable HDD to the 360 but it didn’t show up as a disc. Didn’t work on the Samsung home theatre as well. A quick google and I figured out the disc was formatted as NTFS (right-click Properties on your drive to check) on which is not supported by the 360.

Okay so backed up the data and when I try to format as FAT32 there is no such option on the Explorer ‘Format’ dialog. It’s either NTFS or exFAT, couldn’t figure out if the 360 supported exFAT (should have tried) so went about trying to format from the command line. Which does have a switch for FAT32.

Unfortunately format.exe complains that the partition is too big. What I should not have done was to try a quick format.

Instead I went about deleting the partition as mentioned by several sites. There’s a good one built into Windows (Disk Management) that you can get through from ‘Computer Management’. So right-clicked on the external disc and did a ‘Delete Volume’. And then right-clicked and created a new volume. [NOTE: I think the whole delete and create a new volume can be skipped if you already have the partition in NTFS).

Next tried the format.exe again. Still fails complaining that the disc is too big. At whim tried formatting without the /Q (quick format) option. Worked fine.

Here’s how you would go about it (replace Q: with the drive letter of your portable disc).

C:\>format Q: /FS:FAT32

Show Folder Tree in Windows 7 Explorer

I spend a lot of my time switching between folders in Windows explorer and the Windows 7 explorer has been driving me nuts lately.

Win7 (or at least the build I have) by default does not auto expand the tree view when you navigate between folders.And recently a friend of mine who I worked with and used to buy youtube views from asked if there’s anything that I can do about it.

The result being you don’t see the usually tree hierarchy on the left pane. Which makes it quite painful if you want to go up a few levels or see the other parent folders.Windows7-Explorer

Luckily there is a new Folder Option called Navigation Pane to switch them back on again. You need to press Alt + T or Organize –> Folder Search Options in Windows Explorer to get to the dialog. Windows7-FolderOptions

Switch both of them on and viola I get my beloved tree view back.


PS- Most of my UW colleagues use other explorers and didn’t have to feel this pain.

Microsoft .NET Framework 3.5 SP1 breaks Microsoft CCF (Customer Care Framework)

So your seeing this exception in your WCF client application after installing SP1 on .NET Framework 3.5

System.ServiceModel.Security.MessageSecurityException occurred Message="The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate

As described in this bug report Microsoft classifies this as a known issue, with the bug being resolved as ‘By Design’.

Your fix is to add an identity element to the WCF endpoint like this.

    <userPrincipalName value="WcfServiceAccount@domain" />

But the problem with CCF is that the url for some of the endpoints are read through code from a database and set through the proxy class. Now when you do this the identity from the config file does not flow through resulting in the same exception you see above.

One option is to uninstall the service pack on the client. This is not as easy as it seems because the the 3.5 service pack also updates assemblies in the 2.0 and 3.0 frameworks to their SP2 levels.

To get back to pre 3.5 SP1 you need to uninstall all the frameworks and re-install them again avoiding the 3.5 SP1. The exact steps to do this is outlined here by Microsoft engineer, Aaron Stebner.

But what if you don’t have the luxury of walking all your end-users through the uninstall? A suggested fix from Microsoft (targeting CCF) is as follows:

  1. Set up a cNAME in DNS for the servername you are using in database urls.
  2. Use setspn -a HOST/CNAME domain\apppooluser
  3. Change all the database urls to this CNAME
  4. Do an iisreset
  5. Test

For example if the database urls are http://ccfserver/.....

  1. Create a  CNAME CCFALIAS in DNS
  2. setspn -a HOST/CCFALIAS ccf\aspuser
  3. Change all database urls to ccfalias
  4. iisreset
  5. Test if you reach /urls with this alias from web servers and from clients

Be careful not to set HOST/CCFSERVER spn for aspuser. Note we are setting HOST/CCFALIAS spn which is CNAME for ccfserver in DNS. If by mistake you set host/ccfserver it can wreak havoc  for Kerberos.

Another Dell XPS M1330 tip: External Display Flicker

Although five of us have exact same setup, I am the only one at work to experience the external display flickering. I tried everything from downloading all the latest updates from the dell site, mucking around with all the display options to no avail. I even plugged in my XPS to a couple of my colleagues displays (in high hopes of stealing it if it worked) but no, it had to flicker for my laptop. Whereas they would happy go about their merry day with a crystal clear and crisp display while I looked on enviously.

I finally got fed up today when the flickering worsened and asked Google again, “why me?” and Google replied “You are not alone”, the only problem was that I had to go through Google cache as Dell seems to have pulled the plug on this particular page.

Thankfully Brandon (aka GadgetPhreak) had found a workaround and posted it way back in Dec 07, here’s what he says.

I purchased an XPS M1330 configured as follows:

  • SYSTEM COLOR: Tuxedo Black
  • PROCESSOR: Intel® Core™ 2 Duo Processor T7500 (2.2GHz/800Mhz FSB, 4MB Cache)
  • OPERATING SYSTEM: Genuine Windows Vista™ Business Edition
  • LCD AND CAMERA: Slim and Light LED Display with VGA Webcam
  • MEMORY: 3GB Shared Dual Channel DDR2 at 667MHz
  • HARD DRIVE: Speed: 160GB SATA Hard Drive (7200RPM)
  • VIDEO CARD: 128MB NVIDIA® GeForce™ 8400M GS
  • WIRELESS CARDS: Intel Next-Gen Wireless-N Mini-card
  • BLUETOOTH AND WIRELESS USB: Built-in Bluetooth capability (2.0 EDR)
  • BATTERY OPTIONS: 6 cell Primary Battery and 9 cell additional Lithium Ion Battery
  • SOUND OPTIONS: ExpressCard Sound Blaster X-Fi® Xtreme Audio Sound Card
  • FINGERPRINT SCANNER: Biometric Fingerprint Reader

I attempted to connect it to the same external monitor used with my XPS 1210 (a 20" Viewsonic VX2025wm LCD with a native resolution of 1680x1050) and where I used to get a crisp, clean, flicker-free image with my M1210, I now get a lot of screen flicker.

I did some research and found someone running a similar type of LCD who had better luck with using an HDMI to DVI-D adapter and ran it into the DVI input on his monitor.  However, that didn't work for me.

In trouble shooting this I found something interesting, when I remove AC power to my laptop while connected to the Viewsonic, the flickering stops.  When I reconnect it the flickering starts up again.  This is true regardless of what resolution I am running on either the laptop or Viewsonic.  I went through the advanced power settings and tried looking for differences for when the AC is plugged in vs. when it's running on battery.  I also tried re-installing video drivers, as well as the latest Nvidia drivers from Dell downloads.  Nothing has resolved this yet.


Thanks in advance,



And behold I pulled out my power cable and the flickering stopped! Now I’m off to customer support to see if I can get an HDMI to DVI cable ;)

Windows 7: New Keyboard Shortcuts

There are quite a few new keyboard shortcuts in Windows 7 and some of them are a godsend when working on a multi-monitor setup. I can finally retire UltraMon just to get a keyboard shortcut for switching windows between monitors.

There are new shortcuts for maximizing, restoring and minimizing windows as well. I will now be retiring an old keyboard shortcut that I’ve been using since Windows 3.1 (if you didn’t know Alt+Space, X for maximizing and Alt+Space, R for restore and Alt+Space, N for minimize).

Here’s a full list of the new keyboard shortcuts from TechNet, I couldn’t get the Win+(+/-) Zoom working though.

Windows 7 beta 1 includes some handy new shortcut key combinations that allow you to navigate and manage the Windows workspace more efficiently. Here are 10 new Windows 7 shortcuts that will help you speed up your workflow (“Win” means the Windows Key):

Win+Home: Clear all but the active window
Win+Space: All windows become transparent so you can see through to the desktop
Win+Up arrow: Maximize the active window
Win+Down arrow: Minimize the active window or restore the window if it's maximized
Win+Left/Right arrows: Dock the active window to each side of the monitor
Win+Shift+Left/Right arrows: If you've got dual monitors, this will move the active window to the adjacent monitor
Win+T: Shift focus to and scroll through items on the taskbar
Win+P: Adjust presentation settings for your display
Win+(+/-): Zoom in/out
Shift+Click a taskbar item: Open a new instance of that particular application

Windows 7 beta and the beta nVidia Driver

Two words: Don’t install

This is what nVidia says and you typically get it through Windows Update. I suffered with the title bar going missing and ugly black blocks on my desktop for a week before I figured that the nVidia beta drivers were to blame. It looks like others too are having the same problem.

It appears on Windows Update as: NVIDIA driver update for NVIDIA GeForce 8400M GS (Prerelease – WDDM 1.1) Optional

If you already installed it you can either Rollback the Update:

  1. Start-> type in ‘Device Manager’ and open it
  2. Expand the Display adapters node
  3. Double-click the NVIDIA node
  4. On the Driver tab click ‘Roll Back Driver’

Or you could uninstall the driver

  1. Start –> type in ‘Programs’ and launch ‘Add or remove programs’
  2. In the search box (top right) type in ‘nvidia’
  3. Right-click and uninstall the ‘NVIDIA Drivers’

After one (sometimes two) re-boots you should be all set.

Ranaviru Fund

Let me start by saying that I don’t believe in war, I’m more in the camp of Gandhi and Mandela who showed that although difficult you can achieve what you want through peaceful means. In short I don’t support the LTTE neither do I believe in a government that spends millions of dollars bombing it’s own people.

And every war takes it’s toll on people, leaving them mutilated, suffering and traumatized for life. The Ranaviru Fund is an effort by a few friends, some of whom I know and trust, and tries to provide some relief to those suffering.

Apparently one of the biggest needs for the veterans are gel socks and is used by amputees to help reduce their pain when the amputated stump rubs against the artificial limb. Unfortunately they cost money and they instead have to do with regular cotton socks which are ineffective in reducing pain and also wear off easily.

This is where we can help. A single gel sock costs about $10 and for the cost of a typical meal</font> we can help reduce someone’s pain for at least a year. So take 5 minutes of your time to visit and make at least a $10 donation through PayPal.

Dell Studio: Slow mouse (touchpad) and missing keys issue

Just before I installed Windows 7, the new Dell Studio suddenly started slowing down. The touchpad movements would be jerky and some keys wouldn’t get pressed. A post on a dell support forum outlined the same problem that I had and the keys the other user reported were the exact same ones.

What’s even worse is that the support site is so bad I can’t even locate that forum post. But here are a couple I found reporting the same problem (one with keyboard problems here and another with touchpad problems).

Draining the battery power was one suggestion but couldn’t be bothered doing that, I just went with updating the BIOS to the latest version (A05) and viola that fixed it.

So here’s to anyone having the same problem with a Dell Studio where the whole machine goes into slow motion when moving the mouse with the touchpad as well as when punching in the keys into the keyboard go missing. Solution: Update your BIOS to the latest version.

Running Windows 7 Beta

With everyone reporting that Windows 7 beta was very stable I upgraded both my wife’s Dell Studio and my Dell 64-bit XPS to Windows 7.

Both setups ran fine without a hitch although the upgrade route took a couple of extra hours with all the migrating of application and user settings.

The good news is that I’ve been using both for over a week without any major hitches. The only problems I’ve had so far are to do with the 64-bit install. The first one being Windows Live Mesh which stays forever at the ‘Live mesh is starting’ step (there doesn’t seem to be any kind of fix out for this) and Google Chrome which flat out doesn’t work unless you add a flag to it’s startup. This seems to work for most cases except for a few place where it fails like the new Gmail Offline access using Gears.