mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Add Quiet switch
This commit is contained in:
@@ -25,8 +25,10 @@ bool CFxHelper::IsDotNet45OrHigherInstalled(void)
|
||||
}
|
||||
|
||||
|
||||
void CFxHelper::HelpUserInstallDotNetFramework()
|
||||
void CFxHelper::HelpUserInstallDotNetFramework(bool isQuiet)
|
||||
{
|
||||
if (isQuiet) return;
|
||||
|
||||
CTaskDialog dlg;
|
||||
TASKDIALOG_BUTTON buttons [] = {
|
||||
{ 1, L"Install", },
|
||||
|
||||
@@ -4,6 +4,6 @@ class CFxHelper
|
||||
{
|
||||
public:
|
||||
static bool IsDotNet45OrHigherInstalled(void);
|
||||
static void HelpUserInstallDotNetFramework();
|
||||
static void HelpUserInstallDotNetFramework(bool isQuiet);
|
||||
};
|
||||
|
||||
|
||||
@@ -18,8 +18,11 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
AtlInitCommonControls(ICC_COOL_CLASSES | ICC_BAR_CLASSES);
|
||||
hr = _Module.Init(NULL, hInstance);
|
||||
|
||||
CString cmdLine(lpCmdLine);
|
||||
bool isQuiet = (cmdLine.Find(L"/quiet") >= 0);
|
||||
|
||||
if (!CFxHelper::IsDotNet45OrHigherInstalled()) {
|
||||
CFxHelper::HelpUserInstallDotNetFramework();
|
||||
CFxHelper::HelpUserInstallDotNetFramework(isQuiet);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user