###Function###
Run

###Description###
Runs an external program.

###Syntax###
Run ( "filename" [, "workingdir" [, flag]] )


###Parameters###
@@ParamTable@@
filename
	The name of the executable (EXE, BAT, COM, or PIF) to run.
workingdir
	[optional] The working directory.
flag
	[optional] The "show" flag of the executed program:
	  @SW_HIDE = Hidden window
	  @SW_MINIMIZE = Minimized window
	  @SW_MAXIMIZE = Maximized window
@@End@@


###ReturnValue###
Erfolg:  The PID of the process that was launched.
Misserfolg:  Depends on RunErrorsFatal; see Remarks.


###Remarks###
To run DOS (console) commands, try <i>RunWait(@ComSpec & " /c " & 'commandName', "", @SW_HIDE)</i>

After running the requested program the script continues.  To pause execution of the script until the spawned program has finished use the RunWait function instead.

By default the script will terminate with a fatal error if the Run function fails.  To set @error to 1 as an indication of Misserfolg, see AutoItSetOption.

###Related###
RunAsSet, RunErrorsFatal (Option), RunWait


###Example###
@@IncludeExample@@
