Click or drag to resize
Ranorex

HostRunApplication Method (String, String, String, Boolean, RunAppFlags)

Runs an application with the specified filename, passing the specified arguments and setting the specified working directory.

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public int RunApplication(
	string fileName,
	string arguments,
	string workingDirectory,
	bool maximized,
	RunAppFlags runFlags
)

Parameters

fileName
Type: SystemString
The name of the application to run.
arguments
Type: SystemString
The arguments to pass to the application on startup.
workingDirectory
Type: SystemString
The working directory to use for the started application.
maximized
Type: SystemBoolean
Specifies whether the application should be started with a normal or maximized main window.
runFlags
Type: RanorexRunAppFlags
Specifies special startup behavior to use when running an application.

Return Value

Type: Int32
The process ID of the started application.
Exceptions
ExceptionCondition
RanorexExceptionThrown if the application cannot be started.
Remarks
Using an AppUserModelId (familyName!appName) instead of a file name activates a Windows 8 App instead.
See Also