HOWTO: Uninstall broken Windows 8 apps

29 03 2012

I had a problem with a Windows 8 app (the „Flow“ game) which was partially broken. The app’s tile was no longer shown on the start screen, and no icon was shown when I searched for the app’s name, though Windows noted that there was „1 Application“ with a matching name – but no tiles where shown. For this reason, I couldn’t right-click the tile to uninstall it.

Thanks to MS support I learned that apps can be uninstalled manually through some PowerShell commands. They pointed me to this thread.

List all installed apps:

Get-AppxPackage –AllUsers

Remove a specific app:

Remove-AppxPackage FullPackageName

Hint: Windows 8 apps are placed in a hidden folder named C:\Program Files\WindowsApps. Simply deleting (or renaming) an app’s folder will not properly uninstall it.





WPF button in WPF Bing Maps MapItemsControl not reacting to touch events

15 03 2012

Today I a solved problem with buttons placed on a MapItemsControl inside a WPF Bing Maps control not reacting to touch events. The full description of the problem and also the solution (custom TouchButton class with OnTouchDown, OnTouchMove and OnTouchUp overrides) can be found in the Bing Maps support forum.

Here’s the code:

 public class TouchButton : Button
  {
    protected override void OnTouchDown(TouchEventArgs e)
    {
      if (e.TouchDevice.Capture(this))
      {
        IsPressed = true;
        e.Handled = true;
      }
      base.OnTouchDown(e);
    }

    protected override void OnTouchMove(TouchEventArgs e)
    {
      if (e.TouchDevice.Captured == this)
      {
        // Update IsPressed property to indicate if the
        // current touch position is within the element's
        // visuals.
        IsPressed = IsHitTest(e.GetTouchPoint(this).Position);
        e.Handled = true;
      }
      base.OnTouchMove(e);
    }

    protected override void OnTouchUp(TouchEventArgs e)
    {
      if (e.TouchDevice.Captured == this)
      {
        ReleaseTouchCapture(e.TouchDevice);
        IsPressed = false;

        // Raise Click event if touch up occurs within
        // the element's visuals.
        if (IsHitTest(e.GetTouchPoint(this).Position))
        {
          OnClick();
        }

        e.Handled = true;
      }
      base.OnTouchUp(e);
    }

    private bool IsHitTest(Point point)
    {
      var hitTestResult = VisualTreeHelper.HitTest(this, point);
      return hitTestResult != null && hitTestResult.VisualHit != null;
    }




Windows 8 Beta („Consumer Preview“) Experiences

2 03 2012

I’d like to summarize my so far very positive experiences with the Windows 8 Beta („Consumer Preview“) here.

I downloaded and installed the 64-bit en-US version on my XPS15z laptop into a virtual disk (.vhd file). The download was very fast (on an average download rate of 6.2 MB/s!), so it took less than 10 minutes to get it from the Microsoft servers.

Installation was seemless despite the extra hops that need to be taken to get it installed into a .vhd file. I followed the Guide to Installing and Booting Windows 8 Developer Preview off a VHD (Virtual Hard Disk) by Scott Hanselman for the Windows 8 Developer Preview and it still works exactly as described with the Beta. The only thing you need to be aware off is that the drive letter where you created the .vhd file upfront might change from C: to D: (in my case).

Windows 8 benefits over Windows 7

1. Hardware Support

Windows 8 seamlessly recognized the most important of the XPS15z’s quite modern hardware components, namely the Intel WLAN adapter, the Atheros Ethernet adapter, and the USB 3.0 host controller. On Windows 7 it was a PITA to get the drivers installed if you have neither access to USB, nor to a network and you don’t have a driver DVD handy.

Also, my network enabled EPSON BX635FWD printer was automatically detected, and the EPSON driver software was automatically installed.

Very nice experience!

2. Out-of-the-box support for mounting .ISO images

No more need to download and install Virtual Clone Drive or alike.

3. Mouse Without Borders

Installation Mouse Without Borders (one of my favorite tools) was a bit bumpy because this software is dependent on the .NET framework 2.0. Windows 8 comes with .NET framework 4.5 preinstalled, but this does not include the older .NET framework 3.5.1 (which includes 2.0). Installation through the „Programs and Features“ applet failed, maybe because Internet was only available through the company proxy.

But I could get .NET framework 3.5.1 by mounting the downloaded Windows 8 installation .ISO image (which was a snap thanks to the integrated .ISO support) and executing the following command:

Dism.exe /online /enable-feature /featurename:NetFX3 /All /Source:F:\sources\sxs /LimitAccess