Commit 84cf9caa authored by Alexandre Julliard's avatar Alexandre Julliard

qmgr: Ignore errors when registering the service.

parent e5bef99f
......@@ -113,7 +113,6 @@ static HRESULT register_service(BOOL do_register)
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;
HRESULT hr = S_OK;
scm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (!scm)
......@@ -129,14 +128,12 @@ static HRESULT register_service(BOOL do_register)
CloseServiceHandle(scm);
if (!service)
return SELFREG_E_CLASS;
if (!do_register)
hr = DeleteService(service) ? S_OK : SELFREG_E_CLASS;
if (service)
{
if (!do_register) DeleteService(service);
CloseServiceHandle(service);
return hr;
}
return S_OK;
}
/* Use an INF file to register or unregister the DLL */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment