ApplicationManagerRunAs Method |
Runs an application under another user account and returns the application process object.
Namespace:
SmartBear.TestLeft
Assembly:
SmartBear.TestLeft (in SmartBear.TestLeft.dll) Version: 14.70.237.11 (14.70.237.11)
Syntax public IProcess RunAs(
string path,
string userName,
string password,
string commandLine = "",
string workingFolder = ""
)
Public Function RunAs (
path As String,
userName As String,
password As String,
Optional commandLine As String = "",
Optional workingFolder As String = ""
) As IProcess
Dim instance As ApplicationManager
Dim path As String
Dim userName As String
Dim password As String
Dim commandLine As String
Dim workingFolder As String
Dim returnValue As IProcess
returnValue = instance.RunAs(path, userName,
password, commandLine, workingFolder)
public:
IProcess^ RunAs(
String^ path,
String^ userName,
String^ password,
String^ commandLine = L"",
String^ workingFolder = L""
)
Parameters
- path
- Type: SystemString
The path to the application. Can be specified as a fully-qualified path, as the application name (if the application is in PATH environment variables), or by using environment variables (%PROGRAMFILES%, %USERPFOFILE%). - userName
- Type: SystemString
The user name (in the format Domain\UserName) to be used to run the application. - password
- Type: SystemString
The user's password. - commandLine (Optional)
- Type: SystemString
Command-line arguments for the application. - workingFolder (Optional)
- Type: SystemString
The path to the working folder of the application.
Return Value
Type:
IProcessThe
IProcess object that corresponds to the launched application instance.
Exceptions See Also