Saturday, March 10, 2007

No sound in Remote Desktop (Terminal Services) sessions to Windows 2003

I've hit this problem yesterday, and since it took me an hour to solve it I thought I should post the solution here...

Basically, I was connecting from work using Terminal Services / Remote Desktop to my home machine, a Windows 2003 Server, and I was trying to listen music.
Unfortunately, Windows Media Player was giving me the following error:
"Windows Media Player cannot play the file because there is a problem with your sound device. There might not be a sound device installed on your computer, it might be in use by another program, or it might not be functioning properly."

I knew a couple months ago I was listening to my music on the home machine, so why isn't it working now?

In the help page I found the error code C00D11BA: "Cannot play the file" but the description there was not very helpful. I checked all the drivers, all appeared to be installed correctlyand working. Since I recently switched my network from a workgroup to a domain configuration, I thought there might be a domain policy preventing audio playing in TS sessions. But I found no such setting. I then thought client's configuration might be the culprit (I only had Vista clients), especially because connecting to other servers at work and trying to play sound files produced the same error. But no, that wasn't it.
I spent an hour searching the Internet, browsing articles that talked about enabling/disabling sound in client RDP settings, reinstalling DirectX on server, etc., etc.

Eventually I came up upon the right solution ...

Windows 2003 Server allows disabling certain resources in Remote Desktop sessions, and guess what? The sound is by default disabled for Windows Terminal Services sessions...

So, here is how to re-enable audio in TS sessions on Win2003:
- Launch "Control Panel" (Start Menu / Settings / Control Panel)
- In "Administrative Tools", launch "Terminal Services Configuration"
- In the mmc applet, select the Connections node, select the RDP-Tcp session settings in the right pane, right click it and open the Properties page.
- Click the "Client Settings" tab
- In the bottom of this dialog where the "Disable the following:" section is, uncheck the "Audio mapping" which is checked by default.
- Ok the Properties dialog.

If you are connected already to a TS session, you'll have to LogOut first (no, Disconnect won't be enough!), then LogIn again to the server, and voila! Now your audio files should play fine.

It's obvious now that you know about this hidden setting, isn't it? ;-)

10 comments:

Alin Constantin said...

The same thing applies to Windows 2008 Server: In Remote Desktop sessions, by default the Audio Redirection is disabled.
Also, by default, the Color Depth of the display is limited to 16 bits per pixel. The color depth limit can be removed from the same Client Settings dialog in Terminal Services Configuration

Elvina said...

Good post.

Locivars Vonvik said...

Thanks, been looking for this for a while!

A shortcut is to go to start->run tscc.msc

ybfjax said...

I will copy and paste the email that I sent to my server provider after I took hour figuring it out.

Ok. I fixed it, or so i think. I was able to find the ability to activate sound within the remote computer. AND get this sound to pass through to the RDC computer. This is for Windows Server 2003 Standard Edition

Start > Run > gpedit.msc

Once Group Policy Object Editor window is open, you'll see the folder tree on the left. Go to

Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Terminal Services > Client/Server data redirection >

You'll see a bunch of options and one of them is Dont Allow (or Allow) Audio Redirection. Right click or double-click on the file to bring up the properties of that group policy. It probably says Not Configured or Disabled. You want to set it to 'Enable' Apply and press ok. Restart the server.

Of course, you also have to ensure that on the RDC client, in preferences you set the sound options to allow it to pass through. I was using a mac RDC, but windows RDC should be similar.


Then restart the server (or log out and log back in. I always use a hard restart just in case). If done correctly, when you login the next time into the server, you should hear sound. Also, you will see that in the control panel, you have sound options. In other words, you can adjust the volume output just like Windows XP or any normal desktop in the system tray.

These things you (GalaxyVisions) all should know as administrators. I spent hours googling and trial/error to get this far.

Now I have to get the printer to pass through from the server to the RDC printer. Any ideas?

I can provide s screenshot if necessary. But there is no way to attach the image here. But the directions are exact. A different server version or installation the help might be in a slightly different folder.

But the advice previously using the tscc.msc , I already had everything unchecked. Now if you go to the same menu, the audio mapping is greyed out UNCHECKED.

Alin Constantin said...

@ybfjax: Sorry, I have no idea about the printer. For me it worked in all cases with default settings.

You may want to check on the same RDP-Tcp Properties page I was talking about for ClientSettings, there are a couple of settings to disable redirection for Windows Printer, LPT, Default to main client printer, etc.
If settings are grayed out or don't have any effect I'd check if some domain settings are applied to your machine or look for other system policy/templates.
If you find out what it was, please do share...

Bear said...

Thanks a lot for the hint with the Group Policy Object Editor. That is the first useful description I found.

Greetings from Germany

roberto said...

Thanks you for this informative post!

simongrahamchapman said...

Excellent tip - have been searching a lot around the web for this tip and drew a blank everywhere else. Many thanks for this!

com1of1 said...

Thanks very much for this!

Most posts in the net are crap because they are missing a detail (like for me, I didn't Logoff remotely, only disconnected).

Greetings from Euroland :o

Mark Strydom said...

Thank you for your post.