Skip to content

Commit

Permalink
Fixed an issue where --inf-default-install wouldn't set reboot requir…
Browse files Browse the repository at this point in the history
…ed correctly
  • Loading branch information
nefarius committed Jun 6, 2023
1 parent 3dd5013 commit 7c142b7
Show file tree
Hide file tree
Showing 2 changed files with 733 additions and 711 deletions.
10 changes: 8 additions & 2 deletions src/Devcon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1011,8 +1011,8 @@ bool devcon::inf_default_install(const std::wstring& fullInfPath, bool* rebootRe
{
logger->error("No DefaultInstall and no Manufacturer section, can't continue");
errCode = ERROR_SECTION_NOT_FOUND;
}
break;
break;
}
}

Newdev newdev;
Expand All @@ -1037,7 +1037,10 @@ bool devcon::inf_default_install(const std::wstring& fullInfPath, bool* rebootRe
logger->verbose(1, "DiInstallDriverW returned with %v, reboot required: %v", ret, reboot);

if (rebootRequired)
{
*rebootRequired = reboot > 0 || g_RestartDialogExCalled;
logger->verbose(1, "Set rebootRequired to: %v", *rebootRequired);
}
} while (FALSE);

if (hInf != INVALID_HANDLE_VALUE)
Expand Down Expand Up @@ -1109,7 +1112,10 @@ bool devcon::inf_default_uninstall(const std::wstring& fullInfPath, bool* reboot
logger->verbose(1, "InstallHinfSectionW finished");

if (rebootRequired)
{
*rebootRequired = g_RestartDialogExCalled;
logger->verbose(1, "Set rebootRequired to: %v", *rebootRequired);
}
}
else
{
Expand Down
Loading

0 comments on commit 7c142b7

Please sign in to comment.