Note that there are some explanatory texts on larger screens.

plurals
  1. POShellexec vs Exec vs Shellexec my batch file
    primarykey
    data
    text
    <p>I don't find in the help an exhaustive explanation of the difference between Shellexec and Exec. Is the</p> <pre><code>Shellexec('','program.exe',params,'',SW_HIDE,ewWaitUntilTerminated,ResultCode) </code></pre> <p>equivalent to </p> <pre><code>Exec('program.exe',params,'',SW_HIDE,ewWaitUntilTerminated,ResultCode) </code></pre> <p>when working with exe files? Of course, when I want execute a file different from exe or batch, use Shellexec.</p> <p>Sometimes, however, I can't get my istruction to work correctly neither by Shellexec nor Exec. The only solution that always work is to write a batch file and run it via shellexec. Personally I don't like this solution because I have to deal with a temporary file and I don't trust the resultcode obtained. Now I'll have to get back to the batch file solution, because I don't know how to get this instruction work: (the error is that it raises the instruction fails if the destination file is not already present, while in command prompt the instruction works even the destination file does not exist).</p> <pre><code>mysqldump := 'C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin\mysqldump.exe'; params := '-uroot -ppassword myschema&gt;C:\myappdir\backup\newbackup.sql'; //the destination folder exists, the file newbackup.sql does not exist Shellexec('',mysqldump,params,'',SW_HIDE,ewWaitUntilTerminated,ResultCode); </code></pre> <p>I am working on Windows 7 64 bit, the program (an Inno Setup installer) is run with administrative rights</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload