Reference/!execute: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(Created page with "=!execute= command This command will execute 'command' using a call to CreateProcess(). Unlike !system, it does not use the command line processor, so input/output redirect...")
 
mNo edit summary
 
Line 8: Line 8:


<highlight-nsis>!execute '"%WINDIR%\notepad.exe" "${NSISDIR}\license.txt"'</highlight-nsis>
<highlight-nsis>!execute '"%WINDIR%\notepad.exe" "${NSISDIR}\license.txt"'</highlight-nsis>
''Command introduced with NSIS v2.01''

Latest revision as of 11:08, 3 June 2013

!execute

command

This command will execute 'command' using a call to CreateProcess(). Unlike !system, it does not use the command line processor, so input/output redirection and commands like 'cd', 'dir' and 'type' can not be used. !execute also ignores the return value of the executed command. Currently, the only known advantage of !execute over !system is that it does not give trouble when the current working directory is specified using UNC.

On POSIX platforms, !execute will use system() just like !system.

!execute '"%WINDIR%\notepad.exe" "${NSISDIR}\license.txt"'

Command introduced with NSIS v2.01