ExecuteProcess ExecuteProcess ExecuteProcess Class

Definition

Runs an application or batch file as part of a package workflow. This class cannot be inherited.

public ref class ExecuteProcess sealed : Microsoft::SqlServer::Dts::Runtime::Task, Microsoft::SqlServer::Dts::Runtime::IDTSComponentPersist, Microsoft::SqlServer::Dts::Tasks::ExecuteProcess::IDTSExecuteProcess
[Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.executeprocesstask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.ExecuteProcess.Localized), SamplesTag="SsisExecuteProcessTask", TaskContact="Execute Process Task;Microsoft Corporation; SQL Server 2017; © 2017 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.ExecuteProcess.ExecuteProcessUI, Microsoft.SqlServer.ExecProcTaskUI, Version=14.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
[System.Runtime.InteropServices.Guid("A2C0866D-F470-45DC-B742-FB4C3ADE88FE")]
public sealed class ExecuteProcess : Microsoft.SqlServer.Dts.Runtime.Task, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist, Microsoft.SqlServer.Dts.Tasks.ExecuteProcess.IDTSExecuteProcess
Public NotInheritable Class ExecuteProcess
Inherits Task
Implements IDTSComponentPersist, IDTSExecuteProcess
Inheritance
ExecuteProcessExecuteProcessExecuteProcess
Attributes
Implements

Remarks

Although you can use the ExecuteProcess task to open any standard application, such as Microsoft Excel or Microsoft Word, you typically use it to run business applications or batch files that work against a data source.

Constructors

ExecuteProcess() ExecuteProcess() ExecuteProcess()

Initializes a new instance of the ExecuteProcess class.

Properties

Arguments Arguments Arguments

Gets or sets command prompt arguments. The string can contain multiple arguments separated by a space.

Executable Executable Executable

Gets or sets the name of the Microsoft Win32 executable file or batch file to run when the package runs.

ExecutionValue ExecutionValue ExecutionValue

Returns a user-defined object. This property is read-only.

FailTaskIfReturnCodeIsNotSuccessValue FailTaskIfReturnCodeIsNotSuccessValue FailTaskIfReturnCodeIsNotSuccessValue

Gets or sets a Boolean that indicates whether the task fails if the process exit code is different from the value specified in SuccessValue.

RequireFullFileName RequireFullFileName RequireFullFileName

Gets or sets a Boolean that indicates whether the full name and extension of the task is required.

StandardErrorVariable StandardErrorVariable StandardErrorVariable

Gets or sets the name of the variable used to capture the error output of the process to be run.

StandardInputVariable StandardInputVariable StandardInputVariable

Gets or sets the name of the variable to be used as an input to the process to be run.

StandardOutputVariable StandardOutputVariable StandardOutputVariable

Gets or sets the name of the variable used to capture the output of the process to be run.

SuccessValue SuccessValue SuccessValue

Gets or sets the value returned by the executable or batch file that indicates success.

TargetServerVersion TargetServerVersion TargetServerVersion Inherited from Task
TerminateProcessAfterTimeOut TerminateProcessAfterTimeOut TerminateProcessAfterTimeOut

Gets or sets a Boolean that indicates whether the process is forced to end after the time-out period specified by the TimeOut property.

TimeOut TimeOut TimeOut

Gets or sets the number of seconds that the task allows the process to run.

Version Version Version

*** Member deprecated; see Remarks. *** Returns the version of the task. This property is read-only.

(Inherited from Task)
WindowStyle WindowStyle WindowStyle

Gets or sets the style of the window to run the process in.

WorkingDirectory WorkingDirectory WorkingDirectory

Gets or sets the directory in which the files specified in the Arguments property can be found.

Methods

CanUpdate(String) CanUpdate(String) CanUpdate(String)

*** Member deprecated; see Remarks. *** A Boolean that indicates whether the new package XML can update the old package XML.

(Inherited from Task)
Equals(Object) Equals(Object) Equals(Object)

Determines whether two object instances are equal.

(Inherited from DtsObject)
Execute(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging, Object) Execute(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging, Object) Execute(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging, Object)

Runs the task.

GetConnectionID(Connections, String) GetConnectionID(Connections, String) GetConnectionID(Connections, String)

Gets a String containing the ID of the connection.

(Inherited from Task)
GetConnectionName(Connections, String) GetConnectionName(Connections, String) GetConnectionName(Connections, String)

Gets a String containing the name of the connection.

(Inherited from Task)
GetHashCode() GetHashCode() GetHashCode()

Returns the hash code for this instance.

(Inherited from DtsObject)
InitializeTask(Connections, VariableDispenser, IDTSInfoEvents, IDTSLogging, EventInfos, LogEntryInfos, ObjectReferenceTracker) InitializeTask(Connections, VariableDispenser, IDTSInfoEvents, IDTSLogging, EventInfos, LogEntryInfos, ObjectReferenceTracker) InitializeTask(Connections, VariableDispenser, IDTSInfoEvents, IDTSLogging, EventInfos, LogEntryInfos, ObjectReferenceTracker)

Initializes the properties associated with the task. This method is called by the runtime and is not used in code.

LoadFromXML(XmlElement, IDTSInfoEvents) LoadFromXML(XmlElement, IDTSInfoEvents) LoadFromXML(XmlElement, IDTSInfoEvents)

This method is not callable by your application code. To load a package saved as .xml, use the LoadPackage(String, IDTSEvents) method.

SaveToXML(XmlDocument, IDTSInfoEvents) SaveToXML(XmlDocument, IDTSInfoEvents) SaveToXML(XmlDocument, IDTSInfoEvents)

This method is not callable by your application code. To save a package as .xml, use the SaveToXml(String, Package, IDTSEvents) method.

Update(String) Update(String) Update(String)

*** Member deprecated; see Remarks. *** This method updates the old package XML with the new package XML if CanUpdate(String) is set to true.

(Inherited from Task)
Validate(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging) Validate(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging) Validate(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging)

Verifies that the component is properly configured.

Applies to