diff --git a/dlls/qmgr/qmgr_main.c b/dlls/qmgr/qmgr_main.c index 9c6b34582ab..6cf9668390e 100644 --- a/dlls/qmgr/qmgr_main.c +++ b/dlls/qmgr/qmgr_main.c @@ -107,35 +107,6 @@ static void cleanup_register_strtable(STRTABLEA *strtable) } } -static HRESULT register_service(BOOL do_register) -{ - static const WCHAR name[] = { 'B','I','T','S', 0 }; - static const WCHAR path[] = { 's','v','c','h','o','s','t','.','e','x','e', - ' ','-','k',' ','n','e','t','s','v','c','s', 0 }; - SC_HANDLE scm, service; - - scm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); - if (!scm) - return SELFREG_E_CLASS; - - if (do_register) - service = CreateServiceW(scm, name, name, SERVICE_ALL_ACCESS, - SERVICE_WIN32_OWN_PROCESS, - SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL, - path, NULL, NULL, NULL, NULL, NULL); - else - service = OpenServiceW(scm, name, DELETE); - - - CloseServiceHandle(scm); - if (service) - { - if (!do_register) DeleteService(service); - CloseServiceHandle(service); - } - return S_OK; -} - /* Use an INF file to register or unregister the DLL */ static HRESULT register_server(BOOL do_register) { @@ -147,12 +118,6 @@ static HRESULT register_server(BOOL do_register) TRACE("(%x)\n", do_register); - hr = register_service(do_register); - if (FAILED(hr)) { - ERR("register_service failed: %d\n", GetLastError()); - return hr; - } - hAdvpack = LoadLibraryW(wszAdvpack); pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall"); diff --git a/tools/wine.inf.in b/tools/wine.inf.in index ffe19373484..d9e987ba477 100644 --- a/tools/wine.inf.in +++ b/tools/wine.inf.in @@ -124,6 +124,7 @@ AddReg=\ VersionInfo [DefaultInstall.Services] +AddService=BITS,0,BITSService AddService=MountMgr,0x800,MountMgrService AddService=Spooler,0,SpoolerService AddService=StiSvc,0,StiService @@ -131,6 +132,7 @@ AddService=TermService,0,TerminalServices AddService=PlugPlay,0,PlugPlayService [DefaultInstall.NT.Services] +AddService=BITS,0,BITSService AddService=MountMgr,0x800,MountMgrService AddService=Spooler,0,SpoolerService AddService=StiSvc,0,StiService @@ -138,6 +140,7 @@ AddService=TermService,0,TerminalServices AddService=PlugPlay,0,PlugPlayService [DefaultInstall.ntamd64.Services] +AddService=BITS,0,BITSService AddService=MountMgr,0x800,MountMgrService AddService=Spooler,0,SpoolerService AddService=StiSvc,0,StiService @@ -2957,6 +2960,15 @@ HKLM,%CurrentVersionNT%\Time Zones\Yakutsk Standard Time,"Std",,"Yakutsk Standar HKLM,%CurrentVersionNT%\Time Zones\Yakutsk Standard Time,"TZI",1,e4,fd,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,03,00,00,00,00,00,00,00,00,00,03,00,00,00,05,00,02,00,00,00,00,00,00,00 HKLM,%CurrentVersion%\Time Zones,"SymbolicLinkValue",0x60000,"\Registry\Machine\%CurrentVersionNT%\Time Zones" +[BITSService] +AddReg=BITSServiceKeys +Description="BITS Service" +DisplayName="BITS Service" +ServiceBinary="%11%\svchost.exe -k netsvcs" +ServiceType=16 +StartType=3 +ErrorControl=1 + [MountMgrService] Description="Device mounting service" DisplayName="Mount Manager" @@ -2991,6 +3003,10 @@ ServiceType=16 StartType=3 ErrorControl=1 +[BITSServiceKeys] +HKR,Parameters,"ServiceDll",,"%11%\qmgr.dll" +HKLM,%CurrentVersionNT%\SvcHost,"netsvcs",0x00010000,"BITS" + [StiServiceKeys] HKR,Parameters,"ServiceDll",,"%11%\wiaservc.dll" HKLM,%CurrentVersionNT%\SvcHost,"imgsvc",0x00010000,"StiSvc"