From 273ddbf9fdd0a71f34104ba6c831ba53c555d84b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Wed, 31 Oct 2007 18:17:00 +0000 Subject: [PATCH] Repair TCP/IP service installation svn path=/trunk/; revision=30022 --- reactos/dll/win32/netcfgx/netcfgx.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/reactos/dll/win32/netcfgx/netcfgx.c b/reactos/dll/win32/netcfgx/netcfgx.c index 6486f81ebf9..85f61657530 100644 --- a/reactos/dll/win32/netcfgx/netcfgx.c +++ b/reactos/dll/win32/netcfgx/netcfgx.c @@ -101,7 +101,8 @@ static BOOL InstallInfSection( IN HWND hWnd, IN LPCWSTR InfFile, - IN LPCWSTR InfSection) + IN LPCWSTR InfSection OPTIONAL, + IN LPCWSTR InfService OPTIONAL) { WCHAR Buffer[MAX_PATH]; HINF hInf = INVALID_HANDLE_VALUE; @@ -132,12 +133,21 @@ InstallInfSection( if (Context == NULL) goto cleanup; - ret = SetupInstallFromInfSectionW( - hWnd, hInf, - InfSection, SPINST_ALL, - NULL, NULL, SP_COPY_NEWER, - SetupDefaultQueueCallbackW, Context, - NULL, NULL); + ret = TRUE; + if (ret && InfSection) + { + ret = SetupInstallFromInfSectionW( + hWnd, hInf, + InfSection, SPINST_ALL, + NULL, NULL, SP_COPY_NEWER, + SetupDefaultQueueCallbackW, Context, + NULL, NULL); + } + if (ret && InfService) + { + ret = SetupInstallServicesFromInfSectionW( + hInf, InfService, 0); + } cleanup: if (Context) @@ -158,7 +168,8 @@ InstallAdditionalServices( ret = InstallInfSection( hWnd, L"nettcpip.inf", - L"MS_TCPIP.PrimaryInstall"); + L"MS_TCPIP.PrimaryInstall", + L"MS_TCPIP.PrimaryInstall.Services"); if (!ret && GetLastError() != ERROR_FILE_NOT_FOUND) { DPRINT("InstallInfSection() failed with error 0x%lx\n", GetLastError());