Executes the command using the specified credentials.
HRESULT StartWithCredentials( [in] BSTR username, [in] BSTR password );
The name of the RunAs user, in the form domain\username. The user name is limited to 80 Unicode characters.
If this parameter is NULL, the method uses the owner of the job. If this parameter is an empty string, the service searches the credentials cache for the credentials to use. If the cache contains the credentials for a single user, those credentials are used. However, if multiple credentials exist in the cache, the user is prompted for the credentials.
The password for the RunAs user. The password is limited to 127 Unicode characters.
If this parameter is NULL or empty, the method uses the cached password if cached; otherwise, the user is prompted for the password. If your application is a Windows application, you must call the IScheduler::SetInterfaceMode method to specify the parent window for the credentials dialog box.
After starting the command, your application must continue to run until the job that run the command finishes. If your application exits too soon, the HPC Job Scheduler Service may not create and start the task that runs the command.
For an example, see Executing Commands.
HPC Pack 2008 R2 Client Utilities, HPC Pack 2008 Client Utilities