|

WaitForReturn


(boolean) Whether the application will wait until the executable has exited before continuing:



VALUE DESCRIPTION


true


Wait.


false


Don't wait. (Default)


Re t u r n s


image

(number) The process return code if the WaitForReturn parameter is set to true. If WaitForReturn is set to false 0 is returned. You can use Application.GetLastError to determine whether this action failed, and why.


Note: On Windows Vista or later, if this action fails due to requiring elevation, error code 1045 is returned.


Note: If the specified process has not terminated, the termination status returned is STILL_ACTIVE. If the process has terminated, the termination status returned may be one of the following:


The exit value specified in the ExitProcess or TerminateProcess function.


The return value from the main or WinMain function of the process.

The exception value for an unhandled exception that caused the process to terminate.


image

See also: Related Actions


image

image

File.RunAs

OverviewExamples

number File.RunAs ( string Filename,


string Args = "",


string WorkingFolder = "",


number WindowMode = SW_SHOWNORMAL,


boolean WaitForReturn = false, string UserName = "", string Password = "", string Domain = "",

number LogonFlag = LOGON_NO_OPTION,


table CreationOptions = nil,


table ExtendedErrorInfo = nil )


De s cr ip t ion


Runs an executable as a different user.


image

Note: This action only works on operating systems that support user profiles, therefore it is only supported on Windows 2000, Windows Server and Windows XP. It is not supported on non-NT operating systems such as Windows 95/98/ME.


P arame t er s


Filename


(string) The path to the executable (.exe) file.


|