From f3791f9e7dbd8fd454417b7b436a1c738c7de4e7 Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 6 Jun 2009 13:59:38 +0000 Subject: [PATCH] fixed bug #2796189 - ExecShell doesn't always respect maximized window setting git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5970 212acab6-be3b-0410-9dea-997c60f758d6 --- Docs/src/basic.but | 2 +- Source/script.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Docs/src/basic.but b/Docs/src/basic.but index 03a81e90..65544da7 100644 --- a/Docs/src/basic.but +++ b/Docs/src/basic.but @@ -23,7 +23,7 @@ Execute the specified program and continue immediately. Note that the file speci \S2{execshell} ExecShell -\c action command [parameters] [SW_SHOWNORMAL | SW_SHOWMAXIMIZED | SW_SHOWMINIMIZED | SW_HIDE] +\c action command [parameters] [SW_SHOWDEFAULT | SW_SHOWNORMAL | SW_SHOWMAXIMIZED | SW_SHOWMINIMIZED | SW_HIDE] Execute the specified program using ShellExecute. Note that action is usually "open", "print", etc, but can be an empty string to use the default action. Parameters and the show type are optional. $OUTDIR is used for the working directory. The error flag is set if the process could not be launched. diff --git a/Source/script.cpp b/Source/script.cpp index 93076a9a..dabd8979 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -3888,8 +3888,8 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) ent.offsets[3]=SW_SHOWNORMAL; if (line.getnumtokens() > 4) { - int tab[4]={SW_SHOWNORMAL,SW_SHOWMAXIMIZED,SW_SHOWMINIMIZED,SW_HIDE}; - int a=line.gettoken_enum(4,"SW_SHOWNORMAL\0SW_SHOWMAXIMIZED\0SW_SHOWMINIMIZED\0SW_HIDE\0"); + int tab[5]={SW_SHOWDEFAULT,SW_SHOWNORMAL,SW_SHOWMAXIMIZED,SW_SHOWMINIMIZED,SW_HIDE}; + int a=line.gettoken_enum(4,"SW_SHOWDEFAULT\0SW_SHOWNORMAL\0SW_SHOWMAXIMIZED\0SW_SHOWMINIMIZED\0SW_HIDE\0"); if (a < 0) PRINTHELP() ent.offsets[3]=tab[a]; }