Use this overload to create a new process and its primary thread by specifying its file name, user name, password, and domain. The new process then runs the specified executable file in the security context of the specified credentials (user, domain, and password).
Note: |
|---|
When the executable file is located on a remote drive, you must identify the network share by using a uniform resource identifier (URI), not a linked drive letter. |
If the process is already running, no additional process resource is started. Instead, the existing process resource is reused and no new Process component is created. In such a case, instead of returning a new Process component, Start returns nullNothingnullptra null reference (Nothing in Visual Basic) to the calling procedure.
This overload lets you start a process without first creating a new Process instance. The overload is an alternative to the explicit steps of creating a new Process instance, setting the FileName, UserName, Password, and Domain properties of the StartInfo property, and calling Start for the Process instance.
Similarly, in the same way that the Run dialog box can accept an executable file name with or without the .exe extension, the .exe extension is optional in the fileName parameter. For example, you can set the fileName parameter to either "Notepad.exe" or "Notepad". If the fileName parameter represents an executable file, the arguments parameter might represent a file to act upon, such as the text file in Notepad.exe myfile.txt.
Note: |
|---|
The file name must represent an executable file in the Start overloads that have userName, password, and domain parameters. |