다음을 통해 공유


IUIResourceMgr::ExecuteProgram Method

Applies To: System Center Configuration Manager 2007, System Center Configuration Manager 2007 R2, System Center Configuration Manager 2007 R3, System Center Configuration Manager 2007 SP1, System Center Configuration Manager 2007 SP2

The IUIResourceMgr::ExecuteProgram method, in Configuration Manager, sends a request to the software distribution advertised programs client agent to initiate the execution of a program.

[IDL]
HRESULT ExecuteProgram(
      BSTR sProgramId,
      BSTR sPackageId,
      long bRunOnCompletion
);

Parameters

  • sProgramId
    Data type: BSTR

    Qualifiers: [in]

    The ID of the program to run.

  • sPackageId
    Data type: BSTR

    Qualifiers: [in]

    The package ID of the program to run.

  • bRunOnCompletion
    Data type: long

    Qualifiers: [in]

    Value indicating to the agent if the program is to run when download is complete.

Return Values

An HRESULT code. Possible values include, but are not limited to, the following:

  • S_OK
    The method succeeded.

Remarks

If there are any dependent child programs in the dependency chain that have not been run, they are run before the specified program is run.

This method can be called only in the context of the user who is logged on to the client.

The example demonstrates how to run all available programs on a client.

Requirements

UIResource.dll.

Runtime Requirements

For more information, see Configuration Manager Client Runtime Requirements.

Development Requirements

For more information, see Configuration Manager Client Development Requirements.

See Also

Concepts

UIResourceMgr Class
Software Distribution Control Panel Automation