December 2013 - Posts

Fix for Media Center library issue after Christmas tree lights incident
Tue, Dec 24 2013 13:43

Twas the night before Christmas and….

To cut a long story short the PC that runs my Window Media Center (MCE) got switched on and off at the wall twice whilst Christmas tree lights were being put up.

Now the PC is running WIndows 8.1 on modern hardware, so it should have been OK, and mostly was. However I found a problem that MCE was not showing any music, video or pictures in its libraries but the recorded TV library was fine. I suspected the issue was that my media is on an external USB3 RAID unit, so there was a chance that on one of the unintended reboots the drives had not spun up in time and MCE had ‘forgotten’ about the external drive.

So I tried to re-add the missing libraries via MCE > Tasks > Settings > Media Libraries. The wizard ran OK allowing me to select the folders on the external disk, but when I got to the end the final dialog closed virtually instantly. I would normally have expected it to count up all the media files as they were found. Also if I went back into the wizard I could not see the folder I had just added.

A bit of searching on the web told me that MCE shares its libraries with Windows Media Player, and there was a a good chance they were corrupted. In fact running the Windows Media Player trouble-shooter told me as as much. So I deleted the contents of %LOCALAPPDATA%\Microsoft\Media Player folder as suggested. It had no useful effect on the problem. The only change was the final dialog in the wizard did appear to count the media files it found now, taking a few minutes before it closed. But the results of the scan were not saved.

So I switched my focus to Media Player (WMP). I quickly saw this was showing the same problems. If I selected WMP > Organise > Manage libraries no dialog was shown for music, video or pictures. However the dialog did appear for Recorded TV which we know was working in MCE.

image

Also if I selected WMP > Organise > Options… > Rip Music, there was no rip location set, and you could not set it if you pressed the Change button.

image

The web quickly showed me I was not alone in this problem, as shown in this post and others on the Microsoft forums. It is worth noting that this thread, and the others, do seem to focus on Windows 7 or Vista. Remember I was on a PC that was a new install of Windows 8 and in place upgraded to 8.1 via the Windows Store, but I don’t think was the issue.

Anyway I tried everything I could find the posts

  • Restarted services
  • Deleted the WMP databases (again)
  • Uninstalled and re-install WMP via the WIndows Control panel > Install Products > Windows feature
  • Checked the permissions on folder containing the media

Everything seemed to point to a missing folder. The threads talked about WMP being set to use a Rip folder that it could not find. As my data was on an external RAID this seemed reasonable. However on checking [HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer\Preferences\HME\LastSharedFolders] there were no paths that could not be resolved.

So I decided to have a good look at what was going on under the covers with Sysinternals Procmon, but could see nothing obvious, no missing folders, not registry key calls missed.

In the end the pointer to the actual fix was on page 8 of the thread by Tim de Baets. Turns out the issue was with the media libraries in C:\Users\<your username>\AppData\Roaming\Microsoft\Windows\Libraries. If I tried to a open any of these in Windows Explorer I got an error dialog in the form 'Music-library-ms' is not longer working. So I deleted the Pictures, Music and Video library folders in C:\Users\<your username>\AppData\Roaming\Microsoft\Windows\Libraries, which was not a problem as they were all empty.

When I reloaded WMP I could now open the WMP > Organise > Manage libraries dialogs and re-add the folders on my RAID disk, also I could set the Rip folder.

As these settings were shared with MCE my problem was fixed, ready for a Christmas of recording TV, looking at family photos and playing music.

Whether it was the power outages that caused the problem, I have my doubts, as power cuts have not been an issue in the past. maybe it is some strange permission hangover from the upgrade from Windows 8 > 8.1 I doubt I will ever find out.

Getting the domain\user when using versionControl.GetPermissions() in the TFS API
Fri, Dec 20 2013 9:40

 

If you are using the TFS API to get a list of user who have rights in a given version control folder you need to be careful as you don’t get back the domain\user name you might expect from the GetPermissions(..) call. You actually get the display name. Now that might be fine for you but I needed the domain\user format as I was trying to populate a peoplepicker control.

The answer is you need to make a second call to the TFS IIdentityManagementService  to get the name in the form you want.

This might not be best code, but shows the steps required

private List<string> GetUserWithAccessToFolder(IIdentityManagementService ims, VersionControlServer versionControl, string path)
{
    var users = new List<string>();
    var perms = versionControl.GetPermissions(new string[] { path }, RecursionType.None);
    foreach (var perm in perms)
    {
        foreach (var entry in perm.Entries)
        {
                var userIdentity = ims.ReadIdentity(IdentitySearchFactor.DisplayName,
                                                        entry.IdentityName,
                                                        MembershipQuery.None,
                                                        ReadIdentityOptions.IncludeReadFromSource);

                users.Add(userIdentity.UniqueName);
          }
    }

    return users;
}

A hair in the gate
Thu, Dec 12 2013 12:39

My Arc mouse started behaving strangely today, very jumpy. Felt like the cursor was being pulled left. Turns out the problem was a tiny hair caught in the led sensor slot

image

You could see there was a problem as the led was flashing a lot, when it is normally solidly on if turn over the mouse you look into the slot.

Once I got it out all was fine again

Notes from my session of the Visual Studio 2013 launch at NDC London
Wed, Dec 4 2013 21:14

Thanks to anyone who came to my session ‘TFS is not just for Visual Studio users’ at the Visual Studio 2013 at NDC London yesterday. Hope you found it useful and are now thinking of TFS as a tool for heterogeneous teams, not just developers using Visual Studio. As I discussed there are many options:

  • Developers can work within their IDEs
    • Visual Studio 2008, 2010, 2012, 2013
    • Any IDE based on Eclipse
    • Any IDE using MSSCCI (VB6, VS2003, VS2005, MathLab, Enterprise Architect)
  • If not using an IDE can check code in and out  from
    • The command line (.NET and Java)
    • API (.NET and Java) and REST for your own third party developed tools (or from within PowerShell by loading the .NET API assemblies)
    • Windows Explorer Integration allows a checkin and out from Windows Explorer, great for graphics designer’s tools or IDEs with no source control integration
  • You can manage work items from
    • Within Microsoft Office, Excel and Project (2010-2013) – good for batch operations and general project manager activities.
    • But probably a web browsers will be the primary tool for most people, whether on a PC, Mac or tablet
  • Also if you are using a Git repository in your Team Project there are a while range of GIT clients for various platforms all of them will work

The links from my last slide of suggestions were

by But it works on my PC!
Filed under:

Search

This Blog

Tags

Community

Archives

Syndication

Email Notifications

News

  • This site is a mirror of http://blogs.blackmarble.co.uk/blogs/rfennell

Links