Resolved: Windows Media Player shared libraries won’t show up on other devices

I recently had an issue with WMP where my shared libraries wouldn’t show up on other devices.  Specifically this is WMP12, sharing libraries over UPnP. 

I tried all sorts of troubleshooting – even built a UPnP monitor so I could see what was being advertised – they all were (note that WMP won’t show its own shared libraries on the computer that’s sharing them under other libraries).  I noticed a pattern.  The Tablet PC library would show up on both the Laptop PC and the Media PC, and the Tablet PC would see EITHER the Media PC or Laptop PC libraries, but never both.

I tried reconfiguring the home group, rebuilding the libraries, and all that.  I even re-sysprepped the Laptop PC and Media PC.  None of it helped.  I dug in the registry and found something… Turns out it was my export/imported profile causing the issue.

The list of UPnP media servers is in the registry, under "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Media Player NSS\3.0\Servers".  Turns out that the Laptop PC and Media PC had the same serial number, and that serial number is supposed to be unique per the spec.  So I closed WMP, stopped the related services (UPnP Device Host and Windows Media Player Network Sharing Service), deleted the subkeys, and started it all up again.  And they came right back.

More digging found that those keys are related to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\UPnP Device Host\Description".  The next leap took a few minutes.  It looks like when you set up sharing, WMP registers its library with the WMP NSS service, which stores the reference under "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Media Player NSS\3.0\Server Settings".  WMP gets that data from its local settings cache in "HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer\Preferences\HME".  And it pulls data into that from any library it finds.

Those last two bits (the registry keys and library data) are reinforcing.  WMP will rebuild the settings for one from the other.  The solution was to wipe all the WMP settings and the library, then run WMP again.  It will build a new library with entirely new settings (including a new GUID for the media server serial number).

In script form:

First use an elevated account to stop the related services:

net stop WMPNetworkSvc
net stop upnphost

Then wipe the duplicated data from the user account with the affected libraries:

taskkill -f -im wmplayer.exe
rd /s /q "%LOCALAPPDATA%\Microsoft\Media Player"
reg /delete "HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer" /f

And restart the services from an elevated account:

net start WMPNetworkSvc
net start upnphost

And start Windows Media Player at your convenience.  It will go through the configuration dialog again, rebuild the library, and it should present a new serial number for the media server UPnP device.

1 thought on “Resolved: Windows Media Player shared libraries won’t show up on other devices

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s