LaunchBehavior Enumeration

 

Indicates how a process-based task is started.

Namespace:   Microsoft.WindowsServerSolutions.Administration.ObjectModel
Assembly:  Microsoft.WindowsServerSolutions.Administration.ObjectModel (in Microsoft.WindowsServerSolutions.Administration.ObjectModel.dll)

public enum class LaunchBehavior

Member nameDescription
Default

Starts the task with the current user privileges.

RunWithStandardUserPrivileges

Starts the task with standard user privileges.

UseShellExecute

Use the ShellExecute function to start the task.

This enumeration is used by the ProcessTaskStartInfo object.

For more information about the ShellExecute function, see the Microsoft Web site (http://go.microsoft.com/fwlink/?LinkId=116154).

The following code example shows how to use the LaunchBehavior enumeration to run a program with standard user privileges:

TaskCollection tasks = new TaskCollection();
ProcessTaskStartInfo notepadTask = null;
notepadTask = new ProcessTaskStartInfo("notepad.exe");

notepadTask.LaunchBehavior =
    LaunchBehavior.RunWithStandardUserPrivileges;

tasks.Add(new ProcessTask("Launch Notepad", notepadTask));
Return to top

Community Additions

ADD
Show: