Add Quiet switch

This commit is contained in:
Paul Betts
2014-07-29 15:52:00 +02:00
parent 4b70bdcd4f
commit 72e50903d3
3 changed files with 8 additions and 3 deletions

View File

@@ -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", },

View File

@@ -4,6 +4,6 @@ class CFxHelper
{
public:
static bool IsDotNet45OrHigherInstalled(void);
static void HelpUserInstallDotNetFramework();
static void HelpUserInstallDotNetFramework(bool isQuiet);
};

View File

@@ -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;
}