Author: hpoussin Date: Wed Oct 31 21:17:00 2007 New Revision: 30022
URL: http://svn.reactos.org/svn/reactos?rev=30022&view=rev Log: Repair TCP/IP service installation
Modified: trunk/reactos/dll/win32/netcfgx/netcfgx.c
Modified: trunk/reactos/dll/win32/netcfgx/netcfgx.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/netcfgx.c... ============================================================================== --- trunk/reactos/dll/win32/netcfgx/netcfgx.c (original) +++ trunk/reactos/dll/win32/netcfgx/netcfgx.c Wed Oct 31 21:17:00 2007 @@ -101,7 +101,8 @@ 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 @@ 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 @@ 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());