diff --git a/src/xvaga/xvaga.cpp b/src/xvaga/xvaga.cpp index c826be031..e57e50649 100755 --- a/src/xvaga/xvaga.cpp +++ b/src/xvaga/xvaga.cpp @@ -3542,7 +3542,7 @@ long xvt_sys_execute(const char* cmdline, BOOLEAN sync, BOOLEAN iconizetask) delete p; } else - exitcode = wxExecute(cmd, wxEXEC_ASYNC); + exitcode = wxExecute(cmd, wxEXEC_ASYNC /* | wxEXEC_HIDE_CONSOLE*/); } return exitcode; diff --git a/src/xvaga/xvtmail.cpp b/src/xvaga/xvtmail.cpp index eb8f9df8b..bc229a34c 100755 --- a/src/xvaga/xvtmail.cpp +++ b/src/xvaga/xvtmail.cpp @@ -441,13 +441,13 @@ BOOLEAN xvt_powermail_send(const char* to, const char* cc, const char* ccn, "{\n" " $smtp.send($message);\n" " write-host \"E-Mail sent\" \n" - " $exitCode = 1 \n" + " $exitCode = 0 \n" " exit $exitCode \n" "}\n" "catch\n" "{\n" " write-host \"E-Mail not sent\" ; \n" - " $exitCode = 0 \n" + " $exitCode = 1 \n" " exit $exitCode \n" "}\n" ); @@ -458,7 +458,11 @@ BOOLEAN xvt_powermail_send(const char* to, const char* cc, const char* ccn, //una volta scritto lo scritp ps1 cos'è che lo runna? Dove vinene aperta la PowerShell? // al momento lo script generato da campo funziona se runnato direttamente da powershell command << powerFile; + FILE *f; + fopen_s(&f, "maillog.log", "w"); + fprintf(f, "Comando %s\n", (const char*)command); int exit = xvt_sys_execute(command, true, true); - - return exit; -} + fprintf(f, "exitcode = %d\n", exit); + fclose(f); + return exit == 0; +} \ No newline at end of file