mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
setup: add --help and --no_dotnet commands
This commit is contained in:
committed by
Andrey Nekrasov
parent
4e969a3701
commit
870f1095cd
@@ -20,7 +20,7 @@ namespace updating
|
||||
return runtimes->find(DESKTOP_DOTNET_RUNTIME_STRING) != std::string::npos;
|
||||
}
|
||||
|
||||
bool install_dotnet()
|
||||
bool install_dotnet(const bool silent)
|
||||
{
|
||||
const wchar_t DOTNET_DESKTOP_DOWNLOAD_LINK[] = L"https://download.visualstudio.microsoft.com/download/pr/3eb7efa1-96c6-4e97-bb9f-563ecf595f8a/7efd9c1cdd74df8fb0a34c288138a84f/windowsdesktop-runtime-3.1.6-win-x64.exe";
|
||||
const wchar_t DOTNET_DESKTOP_FILENAME[] = L"windowsdesktop-runtime.exe";
|
||||
@@ -52,7 +52,9 @@ namespace updating
|
||||
sei.fMask = { SEE_MASK_NOASYNC | SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NO_CONSOLE };
|
||||
sei.lpFile = dotnet_download_path.c_str();
|
||||
sei.nShow = SW_SHOWNORMAL;
|
||||
sei.lpParameters = L"/install /passive";
|
||||
std::wstring dotnet_flags = L"/install ";
|
||||
dotnet_flags += silent ? L"/quiet" : L"/passive";
|
||||
sei.lpParameters = dotnet_flags.c_str();
|
||||
if (ShellExecuteExW(&sei) != TRUE)
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
namespace updating
|
||||
{
|
||||
bool dotnet_is_installed();
|
||||
bool install_dotnet();
|
||||
bool install_dotnet(const bool silent = false);
|
||||
}
|
||||
Reference in New Issue
Block a user