diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index b1977f99..6913616f 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -842,7 +842,7 @@ static int NSISCALL ExecuteEntry(entry *entry_) char *buf0=GetStringFromParm(0x00); char *buf3=GetStringFromParm(0x31); char *buf2=GetStringFromParm(0x22); - wsprintf(buf1,"%s %s",buf0,buf3); + char *buf1=GetStringFromParm(0x15); update_status_text_buf1(LANG_EXECSHELL); x=(int)ShellExecute(g_hwnd,buf0[0]?buf0:NULL,buf3,buf2[0]?buf2:NULL,state_output_directory,parm3); if (x < 33) diff --git a/Source/script.cpp b/Source/script.cpp index 56f45d2e..b79fd17b 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -3684,6 +3684,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) #endif//!NSIS_SUPPORT_EXECUTE case TOK_EXECSHELL: // this uses improvements of Andras Varga #ifdef NSIS_SUPPORT_SHELLEXECUTE + { ent.which=EW_SHELLEXEC; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=add_string(line.gettoken_str(2)); @@ -3696,10 +3697,13 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) if (a < 0) PRINTHELP() ent.offsets[3]=tab[a]; } + string detail=string(line.gettoken_str(1))+" "+string(line.gettoken_str(2)); + ent.offsets[5]=add_string(detail.c_str()); SCRIPT_MSG("ExecShell: %s: \"%s\" \"%s\" %s\n",line.gettoken_str(1),line.gettoken_str(2), line.gettoken_str(3),line.gettoken_str(4)); DefineInnerLangString(NLF_EXEC_SHELL); + } return add_entry(&ent); #else//!NSIS_SUPPORT_SHELLEXECUTE ERROR_MSG("Error: %s specified, NSIS_SUPPORT_SHELLEXECUTE not defined.\n", line.gettoken_str(0));