Method Reference
Run
Runs an external program
Run "filename" [, "workingdir" [, show_flag]]
Parameters
filename | The name of the executable (EXE, BAT, COM, or PIF) to run. |
workingdir | Optional: The working directory. |
show_flag | Optional: The "show" flag of the executed program: SW_HIDE = Hidden window SW_MINIMIZE = Minimized window SW_MAXIMIZE = Maximized window |
Return Value
Success: The PID of the process that was launched.Failure: see Remarks.
Remarks
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.
The error property is set to 1 as an indication of failure.
Related
Example
Set oAutoIt = WScript.CreateObject("AutoItX3.Control") oAutoIt.Run "Notepad.exe", "", oAutoIt.SW_MAXIMIZE