[SETUPAPI]
[reactos.git] / reactos / dll / win32 / setupapi / install.c
index 5a6ad6c..b6eae76 100644 (file)
@@ -1060,8 +1060,7 @@ profile_items_callback(
     if (SUCCEEDED(hr))
     {
         /* Fill link properties */
-        if (SUCCEEDED(hr))
-            hr = IShellLinkW_SetPath(psl, FullFileName);
+        hr = IShellLinkW_SetPath(psl, FullFileName);
         if (SUCCEEDED(hr))
             hr = IShellLinkW_SetArguments(psl, L"");
         if (SUCCEEDED(hr))
@@ -1814,6 +1813,10 @@ static BOOL InstallOneService(
     GetLineText(hInf, ServiceSection, DescriptionKey, &Description);
     GetLineText(hInf, ServiceSection, DependenciesKey, &Dependencies);
 
+    /* If there is no group, we must not request a tag */
+    if (!LoadOrderGroup || !*LoadOrderGroup)
+        useTag = FALSE;
+
     hService = OpenServiceW(
         hSCManager,
         ServiceName,
@@ -2280,8 +2283,6 @@ BOOL WINAPI SetupCopyOEMInfW(
         SetLastError(ERROR_INVALID_PARAMETER);
     else if (OEMSourceMediaType != SPOST_NONE && OEMSourceMediaType != SPOST_PATH && OEMSourceMediaType != SPOST_URL)
         SetLastError(ERROR_INVALID_PARAMETER);
-    else if (OEMSourceMediaType != SPOST_NONE && !OEMSourceMediaLocation)
-        SetLastError(ERROR_INVALID_PARAMETER);
     else if (CopyStyle & ~(SP_COPY_DELETESOURCE | SP_COPY_REPLACEONLY | SP_COPY_NOOVERWRITE | SP_COPY_OEMINF_CATALOG_ONLY))
     {
         TRACE("Unknown flags: 0x%08lx\n", CopyStyle & ~(SP_COPY_DELETESOURCE | SP_COPY_REPLACEONLY | SP_COPY_NOOVERWRITE | SP_COPY_OEMINF_CATALOG_ONLY));
@@ -2404,7 +2405,7 @@ BOOL WINAPI SetupCopyOEMInfW(
                     {
                         if (GetFileSizeEx(hDestFile, &DestFileSize)
                          && DestFileSize.QuadPart == SourceFileSize.QuadPart
-                         && compare_files(hSourceFile, hDestFile))
+                         && !compare_files(hSourceFile, hDestFile))
                         {
                             TRACE("%s already exists as %s\n",
                                 debugstr_w(SourceInfFileName), debugstr_w(pFileName));