Take care of flag DI_FLAGSEX_NO_DRVREG_MODIFY
authorHervé Poussineau <hpoussin@reactos.org>
Mon, 26 Dec 2005 15:55:33 +0000 (15:55 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Mon, 26 Dec 2005 15:55:33 +0000 (15:55 +0000)
svn path=/trunk/; revision=20337

reactos/lib/setupapi/devinst.c

index ea95434..bfb24c0 100644 (file)
@@ -7476,7 +7476,9 @@ SetupDiInstallDevice(
         goto cleanup;
 
     /* Install main section */
-    DoAction = SPINST_REGISTRY;
+    DoAction = 0;
+    if (!(InstallParams.FlagsEx & DI_FLAGSEX_NO_DRVREG_MODIFY))
+        DoAction |= SPINST_REGISTRY;
     if (!(InstallParams.Flags & DI_NOFILECOPY))
     {
         DoAction |= SPINST_FILES;
@@ -7579,10 +7581,13 @@ SetupDiInstallDevice(
         goto cleanup;
 
     /* Install .HW section */
+    DoAction = 0;
+    if (!(InstallParams.FlagsEx & DI_FLAGSEX_NO_DRVREG_MODIFY))
+        DoAction |= SPINST_REGISTRY;
     wcscpy(pSectionName, L".HW");
     Result = SetupInstallFromInfSectionW(InstallParams.hwndParent,
         SelectedDriver->InfFileDetails->hInf, SectionName,
-        SPINST_REGISTRY, hKey, NULL, 0,
+        DoAction, hKey, NULL, 0,
         NULL, NULL,
         DeviceInfoSet, DeviceInfoData);
     if (!Result)