From b4b9ed3504858f2519821e7453be0b25b3493a0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Fri, 11 Nov 2005 21:39:57 +0000 Subject: [PATCH] The GroupOrder registry value should start with a ULONG containing the number of entries following it. svn path=/trunk/; revision=19150 --- reactos/lib/setupapi/install.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/reactos/lib/setupapi/install.c b/reactos/lib/setupapi/install.c index bdd13cc3097..8dcacca125d 100644 --- a/reactos/lib/setupapi/install.c +++ b/reactos/lib/setupapi/install.c @@ -1212,7 +1212,7 @@ BOOL WINAPI SetupInstallServicesFromInfSectionExW( HINF hinf, PCWSTR sectionname } rc = RegQueryValueExW(hGroupOrderListKey, lpLoadOrderGroup, NULL, &dwRegType, NULL, &bufferSize); if (rc == ERROR_FILE_NOT_FOUND) - bufferSize = 0; + bufferSize = sizeof(DWORD); else if (rc != ERROR_SUCCESS) { SetLastError(rc); @@ -1246,10 +1246,17 @@ BOOL WINAPI SetupInstallServicesFromInfSectionExW( HINF hinf, PCWSTR sectionname goto cleanup; } } - if (flags & SPSVCINST_TAGTOFRONT) - GroupOrder[0] = tagId; else + { + GroupOrder[0] = 0; + } + if (flags & SPSVCINST_TAGTOFRONT) + GroupOrder[1] = tagId; + else + { + GroupOrder[0]++; GroupOrder[bufferSize / sizeof(DWORD)] = tagId; + } rc = RegSetValueExW( hGroupOrderListKey,