Ugh: Windows 8, Metro and Desktop

First I’ll say that every PC I use these days is running Windows 8.1.  That’s my home desktop, laptop, Surface RT, and work PC.

Windows 8 is actually very good on the tablet form factor.  It’s fine on PCs if you’re wanting to stick to the new Metro style apps.

But it’s horrible when mixing desktop and Metro apps.  This seems to be compounded further when you’re running a multiple monitor rig.  Since many people complain about Windows 8 in general without offering specifics, I thought I would.

IE Stops Streaming

So here I am doing some work in Visual Studio or Lightroom. I’d like to stream something to listen to and watch, so I fire up Internet Explorer (Metro).  I dock it on the side of a monitor and get back to work.  Everything’s going just fine, I can glance over and catch a peek. It’s really nice.

Until I need to launch another app, that is.  So I hit the Start button to bring up the Start Screen and BAM.  Audio and video pause.  I suspect it’s because MS didn’t add background audio capabilities to IE, but still… it’s EXTREMELY jarring and frustrating.

Metro Apps Disappear

Many times, it’s happening right now actually, I’ll have a couple Metro apps docked but will still be working on the desktop.  As soon as the desktop app gets focus, some (or all) of the docked apps disappear and leave the start screen background color.  That’s it.  So now I just have a gaping hole of blue. If I click on that hole, the Metro app re-appears.  Give focus back to the desktop app and it disappears once again.

I don’t think it’s a driver issue, but then again I’m running all NVidia displays.  Anyone else experience this?

What’s Going to Happen?

When I want to open or close a Metro app, what happens next feels non-deterministic.  I can never guess where an app will open, what will replace the screen when it closes, etc..  On my Surface, my resolution doesn’t support 3 simultaneous running Metro apps, so I get prompted about which to replace. On my desktops, the new app starts full-screen and I have to move it somewhere.  The result is before launching an app I have to pause and recall which machine I’m on so I can prepare for what will happen (or if I should launch it to begin with given the screen/resolution limitations).

Sometimes after closing and app, I expect the Start Screen to re-appear, but it’ll just be replaced with a blank canvas, forcing me to hit the Start button (keyboard or lower left hotspot) to bring the Start Screen back.

And why, oh why, if I’m on the desktop and launch a Metro app am I not taken back to the desktop if I dock that app somewhere? After docking it somewhere, I’m taken back to the Start screen.  I just noticed this happens regardless of the starting point (Desktop or other Metro app).  Don’t make me remember what I was in before launching the new app, just take me right back there.  It’s ridiculous.

Did I Mention Multiple Monitors is just Weird?

Over the course of writing this, I have a situation where I have the desktop showing on one half of my left monitor and one half of the right monitor (full-screen metro app in between).  You can drag a window “behind” the metro apps, to the other sides.  It’s just really strange and unnatural feeling.

What am I Missing?

So these are my main gripes, coming from someone who uses Windows 8 daily and in multiple form factors.  Hopefully more is done to fix these in upcoming releases, but I’m not holding my breath.

Anyone have any other specific complaints?


Copy File Path in Windows Explorer

Update: I’ve been notified by Mark that this is completely useless.  Please disregard 🙂   In Win7 and 2008 you get the same option by just holding down Shift as you right-click.  Thanks Mark!

Ever find yourself in Windows, browing through files and needing to copy a file’s full path?  As a developer, this seems to happen often, and I today I got tired of not having a quick way of doing this.

A little registry tweak later, I now have a Copy Path command on my right-click menus in Windows Explorer.

This puts the path to the selected file (or folder) in the clipboard.  Quite handy for quickly opening that file in an application without having to navigate folders or type the path.

Download and run the Regedit file here.

That menu option is just conigured to run the following PowerShell command:

c:windowssystem32WindowsPowerShellv1.0PowerShell.exe -Command “‘%1’ | clip”

Simple, yet very effective.

Tracking down a Blue Screen of Death

Since rebuilding my machine with a new motherboard and processor, I’ve gotten a few crashes in the middle of the night. I’ve come downstairs to a rebooted PC with an error message indicating the dreaded Blue Screen of Death has visited. So I decided to figure out what’s causing it, and maybe find a fix.

When a bluescreen happens, Windows will take a snapshot of what is in memory at the time of the crash and store them for analyzing later.  “Mini” crash dumps are stored in c:windowsminidump and are trimmed down (for space reasons) versions of the full crash dumps.  There’s a great tool called Windows Debugger that can be used to take a peek into these dump files to decipher what may be causing the problem.

First I downloaded the Windows Debugging Tools so that I could get the WinDbg (Windows Debugger). 

After installing the tools, start up WinDbg and you’ll see a very plain looking interface that is essentially a console with tons of menu options/commands.


The next step is to open one of those crash dump files.  So go to File -> Open Crash Dump and select one of the .dmp files.  It’ll chug away for a few seconds as it opens, and then you’ll be presented with some messages that include:

***** Kernel symbols are WRONG. Please fix symbols to do analysis.

Symbols are files that contain debugging information for your system files.  They are platform and version dependent – meaning symbol files for a 32-bit Windows XP machine won’t help figuring out a 64-bit Windows 7 problem as is the case here.  Luckily, WinDbg will download the appropriate versions of symbols  once you simply tell it where to get them and where to put them.  Select File -> Symbol File Path and enter the following into the window to save the symbols to a path on your C::


Check the Reload box before closing so that the symbols will be downloaded right away:


 When you click OK, the status bar on the main console will read BUSY as the necessary symbols are downloaded.  Then the cursor will sit and blink, waiting for you to tell it what to do.

Now just type in:

!analyze -v

and you’ll be presented with lots of very technical technical text.  In my case, I scanned through and saw a couple important bits of information:




PROCESS_NAME:  Robocopy.exe


IMAGE_NAME:  memory_corruption

So it sounds like it’s a bad memory pointer resulting in a fun access violation, happening in a kernel function MmCopyToCachedPage.   And it doesn’t seem to have anything to do with power management, instead it was occurring during one of my nighly backups that uses Robocopy to pull files off of the network.

Now, what to do about it?  I tossed MmCopyToCachedPage into Bing, and the very first hit was for someone running a similar processor on the exact same motherboard. (For the record, Google’s search results didn’t appear to be nearly as useful).  Reading through the thread, a mentioned fix was to change a BIOS setting to accomodate the processor better (CPU Margin Enhancement, whatever the heck that is).   Tonight we’ll see if this has any impact on the system crash, I’ll be crossing my fingers.

So there you have it, using WinDbg to get a look into what part of your machine is blowing up.  Thanks for reading.

FogBugz on Windows Small Business Server 2008

I recently installed FogBugz 6 on 64-bit Windows Small Business Server 2008, and boy was it interesting.  I’ll first note that I’ve had excellent installations and upgrades of FogBugz in the past, so this really caught me off guard and took a while to figure out what was going wrong.

Second, after finding out what the problems were, it’s clear that this applies to far more than just FogBugz.  It all boils down to 32-bit web apps running on the 64 bit platform, and the fact that it’s Small Business Server which has TONS of software preconfigured and running on it.

The first problem I ran into was the app-pool crashing with an error in the event log saying:

The Module DLL C:Windowssystem32RpcProxyRpcProxy.dll failed to load. 

Some googling around resulted in learning that RPC over HTTP (a feature used by Outlook Anywhere in Exchange, which is a big part of SBS) is known to break 32-bit worker processes.  One quick solution is to just uninstall the RPC over HTTP Windows feature, and that’s what I did just for speed.

The other fix is to edit applicationhost.config and add preCondition=”bitness64″ for the rpcproxy.dll modules and globalModules entries.  I’ll probably go back and make this change since I’m going to want to use RPC over HTTP.

Anway, I kept getting HTP 500 (500.19 this time) errors when loading the app.  Further investigation revealed that Windows Server Update Services (WSUS), also packaged in Small Business Server, installs a compression module in IIS 7 that, you guessed it, breaks 32 bit app pools.    From the IIS forums, to disable the compression scheme:

%windir%system32inetsrvappcmd.exe set config -section:system.webServer/httpCompression /-[name=’xpress’]

And, to re-enable if you need:

%windir%system32inetsrvappcmd.exe set config -section:system.webServer/httpCompression /+[name=’xpress’,doStaticCompression=’false’,dll=’%windir%system32inetsrvsuscomp.dll’]

And there you have it, after doing those things you can run 32 bit app pools.  As a side-note, I recall that disabling FogBugz’s custom error page was a tremendous help in seeing what was really going on. 

I have very mixed feelings about Small Business Server.  On one hand, there’s so much software configured and running and they all are configured just so to allow them to work.  What’s worse, you really can’t/shouldn’t fight the topology and layout of things that are in place.  If you do, things break and break in very bad ways.  And since there’s so much software installed already, it’s hard to know the side effects of everything.  But on the other hand, it’s thousands and thousands of dollars of software for a fraction of the price.

Aaand finally, if you’re buying a Small Business Server, be sure to get more than 4GB of RAM.  You’ll need it.

Backups and my first foray into PowerShell

First, some background.

Last week I received the final pieces of my backup strategy, a pair of 500 GB hard drives that I will be rotating periodically to some undisclosed location that isn’t my house.  Right now, my fileserver makes backups and sticks them on a mirrored RAID array.  These drives are simply to hold extra copies of these backup files in the event of something Very Bad(tm) happening to our house.

Since it will be leaving my house, I decided I wanted to make sure the data was wrapped up in a nice blanket of encryption goodness.  For ease of use, I have an eSATA docking station that allows the drives to be ‘hot-swapped’ – and for further convenience I’m attaching it to my desktop instead of the server so that it will be harder to forget to rotate the drives out (in the basement = out of sight, out of mind).

So all of this presented an opportunity to learn the relatively-new command line environment, Microsoft PowerShell

The scripts (feel free to download) do the following:

  1. Mount my hard drives as encrypted TrueCrypt volumes, using a keyfile.  Now anything written to the drives are wrapped in that nice encryption blanket I mentioned earlier.  Mmm… scrambled bits and blankets.
  2. Checks the amount of space available in the target directory and deletes the necessary number of old backups to make sufficient room for the new backup copies.
  3. Calls on RoboCopy (included in Windows Vista) to do the actual file copying.  Note that in my testing, I found RoboCopy to be 3-4 times as fast as xcopy across the network.
  4. Sends off a completion email
  5. Dismounts the encrypted volume

Since this was my first use of PowerShell, I’m sure there is a lot of room for improvement and that I’ve only just scratched the surface.  That said, I learned enough about PowerShell that I’m going to keep pushing to learn more.

A few things I like:

  • It was very easy to use several diffferent MS technologies from the one script.  I seemlessly use .NET objects, COM objects, and even pull in some WMI interaction to get the job done.
  • Finally having regular expressions available as first-class citizens in scripts – perl and others.  No absolute need to explicitly fire up the .NET regex classes all the time, even though that’s definitely possible and useful too.
  • Finally not having to rely on essentially screen-scraping command outputs. Yay for objects!
  • Writing custom cmdlets in C# is pretty straightforward.  I started down this route to make my own Start-Backup cmdlet, but decided against it since I specifically wanted to learn PS scripting and not just write the solution in C#.

A few things I dislike:

  • using -lt and -gt (and similar) instead of “<” and “>” for comparisons and equality.  It just feels wrong.
  • Lack of an official language reference – I couldn’t believe one wasn’t available, and this left me in the dark and learning by trial by error on some key behaviors of powershell (like function return values, for instance).  The “documentation pack” has a crappy quick-reference/cheat-sheet sort of thing, but not a real spec.
  • How hard it was to track down the PowerShell SDK – note: you have to download the Windows SDK and blindly choose a few installation options to get the SDK installed.
  • I made the PowerShell crash a few times.  That shouldn’t be able to happen.

FTP problems on Windows Vista

This is an addendum to On Windows Vista from a couple months ago. This weekend I’ve been making some modifications to the installation process for Chef, making it so the database engine isn’t packaged with my installer and making it such an enormous installation package. So now I have it so that when Chef is run for the first time, it will (if needed) download the SQL Express install from my website.

All fine and dandy, until I needed to upload the SQL Express install to my hosting account. I usually just fire up my FTP client and never think twice about it. Well this time it didn’t work. A couple megs would be uploaded and then the client would ask me if I want to overwrite the (incomplete) file on the server. I tried several times with FileZilla to no avail. Then I tried SmartFTP which is certified for Vista. Same thing. Figuring I couldn’t go wrong with WS-Ftp, I gave that a shot and it too failed.

Today I tried the upload from my Windows 2003 server using FileZilla, and it worked without a hitch. WTF.  Just to rule out a problem with my internet connection the previous day, I tried again from my Vista desktop and it failed once more.

Has anyone else seen such behavior?