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.

HRESULT ExecuteProgram(
	BSTR sProgramId,
	BSTR sPackageId,
	long bRunOnCompletion



Data type: BSTRQualifiers: [in]The ID of the program to run.

Data type: BSTRQualifiers: [in]The package ID of the program to run.

Data type: longQualifiers: [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:


The method succeeded.


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.



Runtime Requirements

Development Requirements

See Also

Send comments about this topic to Microsoft.