Installing SSDP and UPNP services under Windows 2k3

Windows 2003 Server does not come with either the Universal Plug and Play service or the SSDP Discovery Service. These services are useful for poking holes in your firewall and supporting image downloading from Canon cameras, among other things.

As it turns out, it is possible to install these services under Win2k3, if you have access to a WinXP machine or install CD. See the last post at this link, or in the case that the link dies, follow the instructions below.

Make a file called XtraServices.inf and save it in c:\windows\inf using notepad, with the following text:

[version]
signature="$WINDOWS NT$"
ClassGUID={00000000-0000-0000-0000-000000000000}
LayoutFile=layout.inf
[DestinationDirs]
UPNP.SysFiles=11
UPNP.XMLFiles=11,icsxml
[Optional Components]
UPNPSvc
[UPNPSvc]
OptionDesc=%UPNP_DESC%
Tip=%UPNP_TIP%
IconIndex=93
CopyFiles=UPNP.SysFiles,UPNP.XMLFiles
Uninstall=UPNP.Remove
RegisterDlls=UPNP.RegisterDlls
AddService=upnphost, 0x410,UPNP_upnphost_Svc
AddService=SSDPSRV, 0x410,UPNP_SSDP_svc, UPNP_Evt
SizeApproximation=678976
[UPNP.Remove]
UnregisterDlls=UPNP.UnRegisterDlls
DelFiles=UPNP.SysFiles,UPNP.XMLFiles
DelService=upnphost
DelService=SSDPSRV
[UPNP.RegisterDlls]
11,, upnp.dll, 1
11,, upnphost.dll, 1
11,, upnpcont.exe,,,"/regserver"
[UPNP.UnRegisterDlls]
24,%lite_path%,%lite_prog%,,,"stop upnphost"
24,%lite_path%,%lite_prog%,,,"stop SSDPSRV"
11,, upnp.dll, 1
11,, upnphost.dll, 1
11,, upnpcont.exe,,,"/unregserver"
[UPNP.SysFiles]
ssdpsrv.dll,,,1
ssdpapi.dll,,,1
upnp.dll,,,1
upnphost.dll,,,1
upnpcont.exe,,,1
udhisapi.dll,,,1
upnpui.dll,,,1
[UPNP.XMLFiles]
cmnicfg.xml
ipcfg.xml
osinfo.xml
potscfg.xml
pppcfg.xml
[UPNP.SysFiles.Security]
"D:P(A;;GRGX;;;BU)(A;;GA;;;BA)(A;;GA;;;SY)(A;;GRGX;;;WD)"
[UPNP_upnphost_Svc]
Description=%UPNPHOST_Desc%
DisplayName=%UPNPHOST_Display%
ServiceType=0x20
StartType=3
ErrorControl=1
StartName="NT AUTHORITY"\LocalService
ServiceBinary=%11%\svchost.exe -k LocalService
AddReg=upnphost.AddReg.Secure, upnphost.AddReg
Dependencies=SSDPSRV
Security="D:(A;;GA;;;SY)(A;;GA;;;BA)(A;;GA;;;AU)(A;;GA;;;PU)(A;;CCDCLCSWLOCRRC;;;LS)"
[upnphost.AddReg]
HKR, Parameters, ServiceDll, 0x20000, "%%SystemRoot%%\System32\upnphost.dll"
HKLM, "Software\Microsoft\UPnP Device Host\HTTP Server", "MaxConnections", 0x00010001, 0x00000050
HKLM, "Software\Microsoft\UPnP Device Host\HTTP Server\VROOTS",,0x0010
[upnphost.AddReg.Secure]
HKLM, "Software\Microsoft\UPnP Device Host",,0x10
[upnphost.AddReg.Secure.Security]
"D:PAR(A;CI;KA;;;BA)(A;CIIO;KA;;;CO)(A;CI;KA;;;LS)(A;CI;KA;;;SY)(A;CI;KR;;;BU)"
[UPNP_SSDP_svc]
Description=%UPNP_Desc%
DisplayName=%UPNP_Display%
ServiceType=0x20
StartType=3
StartName="NT AUTHORITY"\LocalService
ErrorControl=1
ServiceBinary=%11%\svchost.exe -k LocalService
Security="D:(A;;GA;;;SY)(A;;GA;;;BA)(A;;GA;;;AU)(A;;GA;;;PU)(A;;RPWPDTRC;;;LS)"
AddReg=UPNP.AddReg
[UPNP.AddReg]
HKR, Parameters, ServiceDll, 0x20000, "%%SystemRoot%%\System32\ssdpsrv.dll"
[SourceDisksNames]
1=,,,i386
[SourceDisksFiles]
sp1.cab=1,,
sp2.cab=1,,
[StringHunt]
shl_img.inf
msagent.inf
pchealth.inf
wordpad.inf
msinfo32.inf
syssetup.inf
netupnph.inf
[Strings]
KEY_RUN="Software\Microsoft\Windows\CurrentVersion\Run"
KEY_RUNONCE="Software\Microsoft\Windows\CurrentVersion\RunOnce"
KEY_APPPATHS="Software\Microsoft\Windows\CurrentVersion\App Paths"
KEY_UNINSTALL="Software\Microsoft\Windows\CurrentVersion\Uninstall"
KEY_SAFEBOOT="System\CurrentControlSet\Control\SafeBoot"
KEY_PFPROFILE="Software\Policies\Microsoft\Windows\System\PCHealth"
KEY_SVCHOST="Software\Microsoft\Windows NT\CurrentVersion\Svchost"
KEY_LAME="SOFTWARE\Microsoft\PCHealth\Clients\Dialog Comments"
KEY_COMMENT_LINK="Control Panel\Desktop"
______LitePC_Local_Strings______=""
UPNP_DESC="Universal Plug and Play"
UPNP_TIP="Support to host Universal Plug and Play devices and to discover UPnP devices on your network."
UPNPHOST_Display="Universal Plug and Play Device Host"
UPNPHOST_Desc="Provides support to host Universal Plug and Play devices."
UPNP_Display="SSDP Discovery Service"
UPNP_Desc="Enables discovery of UPnP devices on your home network."
LCID="0409"
UILanguageID=1033
MsSHARED="Microsoft Shared"
OLDDB="Ole DB"
ADO="ado"
MSADC="msadc"
DAO="DAO"
MSSOAPBIN="MSSoap\Binaries"
MSSOAPBINRES="MSSoap\Binaries\Resources\1033"
MSInfo32_DESC="System Information"
MSInfo32_INFOTIP="Displays current system information."
SystemTools_GROUP="Accessories\System Tools"
MSINFOPATHL="Microsoft Shared\MSInfo"

Next, make a file called c:\main.inf using notepad, with the following text:

[Version]
Signature="$Windows NT$"
[Global]
WindowTitle="Onemancan"
WindowTitle_Standalone="Onemancan"
[Components]
UPSSvc=ocgen.dll,OcEntry,"XtraServices.inf",,7

Now, you'll need the driver files that this will install. If you have an XP SP2 install CD, you are good to go. Otherwise, you can copy them from your current XP SP2 install. The files you need are listed below; in general just search in your windows folder for upnp, ssd, udhisapi, and copy all those files to a USB drive, and then search for cmnicfg, and copy all the files in that directory to the drive as well.

dpnhupnp.dll
upnp.dll
upnpcont.exe
upnphost.dll
upnpui.dll
ssdpsrv.dll
ssdpapi.dll
udhisapi.dll
cmnicfg.xml
ipcfg.xml
osinfo.xml
potscfg.xml
pppcfg.xml

Now, run this: sysocmgr.exe /i:c:\main.inf

Then launch regedit
Find: hklm\software\microsoft\windows nt\currentversion\svchost
Edit: 'LocalService' Key and add upnphost and SSDPSRV, each on their own line, at the end. Include an empty line afterwards.

Reboot, and finally, open up the Services window (run services.msc), and set Universal PnP and SSDP discovery service to automatic.

Comments

Anonymous said…
This is really useful, almost works for me...

At the end where you say "add a line', do you mean add a DWORD set to 1, and how do you add a blank line?

I am running SBS2003, when I regedit, the LocalService key folder contains 2 DWORD keys, AuthenticationCapabilities and CoOnitializeSecurityParam.

Am I missing something? I added 2 DWORDS for SSDPSRV and upnphost, value 1, but when I run up the services I get an error in Event log saying SSDP Discovery failed due to "The executable program that this service is configured to run in does not implement the service."

All help gratefully received! I am trying to get WMC to run on SBS 2003.

Regards

Rod
Alan Robinson said…
Not quite, Rod. The localservice key should be type REG_MULTI_SZ, not a folder. SVCHOST is the folder it is in. As it turns out, there is also a folder called localService, which confuses things a lot. If you are looking at the localService folder, go back up the hierarchy one folder.
Anonymous said…
Very helpful post, but I, too, didn't understand what you meant by editing the LocalService key.

You say there is a folder called LocalService. However, in Windows registry nomenclature, a folder is called a key, the name of the entry that is, for example, a DWORD, is called a value, and the entry of the information such as 0x2 for a DWORD is the data.

So you navigate keys to get to a list of values in that key and edit the data for each value.

Thanks a bunch for the steps on how to add these services to 2003.
Alan Robinson said…
Using your terminology, there is both a key and a value named LocalService. You want to edit the value LocalService, which is of type REG_MULTI_SZ.

To be absolutely clear, in regedit, open
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost

in the windowpane on the left, and then double click on the entry named LocalService in the windowpane on the right.


Does that clear it up?
Anonymous said…
I have had an error message at startup-disappears after 81 (to be exact) replications. At my level of troubleshooting I found that if I prevent the service "SDDP Discovery Service" from loading at start-up, I do not get an error message. I did recently purchase a canon digital camera and also recently purchase NERO (the latter is really a pain to use) Do you have any advice on whether or not the SSDP is useful or important? Can I safely leave it disabled? Thanks! Eileen
Anonymous said…
Worked like a charm! Thanks to the above and the steps from here:

MSBLOG - Install Windows Media Player 11 on Windows Server 2003

http://www.msblog.org/2006/12/17/install-
windows-media-player-11-on-windows-server
-2003/

I can now access video and music shares from my Xbox 360.

Super job! Thank you very much.
Anonymous said…
I've followed this guide, and the previously mentioned guide to running windows media player 11 on windows 2003, but I am as of yet unable to see my media shares from my Xbox 360. Any clues?
BigRedFed said…
I was having problems with the UPnP service not starting on WindowsXP. Was receiving an error: Event Type: Error
Event Source: Service Control Manager
Event Category: None
Event ID: 7001
Date: 11/15/2008
Time: 1:21:10 AM
User: N/A
Computer: FEDTWO
Description:
The Windows Media Player Network Sharing Service service depends on the Universal Plug and Play Device Host service which failed to start because of the following error:
%%0

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


===============================

Anyways, I followed these instructions, copying the necessary files from another Windows XP machine and was able to resolve the issue with the UPnP service.
AboveUnrefined said…
Thanks for this WI. It was very clear. I'm restarting my system now, and I think it'll go well!

Thanks again

[C]
Anonymous said…
I've followed the instructions and WMP11 runs but I can'r get Media Sahring working. Any ideas,

Windows 2003 Server Web Edition SP2
Anonymous said…
I was prompted for my 2003 Server Installation CD, which I can't locate at the moment. Did anyone else experience this? There's no mention of it. I have the XP pro installation CD.
Anonymous said…
Dude worked like a champ man. Thanks for the work!
Rob The Viking said…
I wasn't prompted to use any CD to install it. I made the two files and ran the command as specified through cmd.exe. The files are all in C:\
I had the CD ready but the install window popped up then immediately disappeared.
Eddie Kominek said…
Worked like a charm; no issues.

Might make a note that you have to point to the XP SP2/3 CD in the \I386 directory for all the files when prompted.
Anonymous said…
I copied the files to my d:\ but never got prompted to install anything. After I ran the sysocmgr.exe /i:c:\main.inf command I see a fast blip of a window and absolutely nothing happens and nothing changes on my server. I never get prompted to copy any files. You stated to place them on a USB drive. What can I change to get them to copy from a local location on the system as I'm not seeing any prompts for file location at all.
mparker said…
ok, I figured out the first part, apparently when I copied the content from the website and pasted into a txt doc it prompted me to save in a Unicode format when it needed to be an ANSI format. That solved the installtion part. I have rebooted the server, started the services but my XBOX360 Slim is still unable to view the Shared Folder on my Server 2003 system. Am I missing another step?
Anonymous said…
Any idea on how to uninstall / reinstall? When I initially installed, I copied the files from a Vista machine as I didn't have access to an XP box / disk. The services wouldn't start, so I thought I could delete them w/ sc.exe (which deleted them), but then when I re-ran the install script, it didn't recreate them. I recreated them w/ sc.exe, but they still don't start. TIA
Anonymous said…
sorry, i'm stupid, i just realized i can run the install app but just don't check anything, duh
Anonymous said…
Thank you so much! I can now control my Sonos from Habeetat Planner running on a Windows 2003 Server! Woooohoooo!
Anonymous said…
EXTREMALY easier way:

1. From Windows Home Server 1.0 installation media copy 'umupnp.exe' file, and unpack it (by 7-zip) to any empty folder.
2. click right mouse button on 'netupnph.inf' and choose 'Install'.
That's all folks! :)
Tested on Windows 2003 R2 Server Standard (PLK)
Alan Robinson said…
Wow that is a lot easier. Haven't got the media (or the Win2k3 system) to test it on anymore though.
Lancelot said…
Thanks a lot Alan Robinson

Also thanks to Eddie Kominek with:
"point to the XP SP2/3 CD in the \I386 directory for all the files when prompted."

Only 1 tiny addition:
Before doing all,
First Search dpnhupnp under C:\Windows
Rename all existing dpnhupnp.dll (eg. dpnhupnp.dll_Cancel.bak )

The reason behind is:
If there is
C:\WINDOWS\ServicePackFiles\i386\dpnhupnp.dll
(eg. Windows Server .... VHD ;) )
Windows may automatically revert back using that file ;)


*
I was searching internet how to use wlanapi.dll with 2k3,
I could not find, but I found current page,
Thanks :)

Email me

Name

Email *

Message *

Popular posts from this blog

piLagTester PRO order page

Panasonic TH-42PX75U Plasma TV review: input lag and upscaling tested using the piLagTesterPRO

Vizio VX20L HDTV review: input lag and upscaling tested using the piLagTesterPRO