> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy

> IXtfApplicationClient::Deploy

Deploys the specified app package.

## Syntax

```cpp theme={null}
public:
HRESULT Deploy(
         LPCWSTR pszDeployFilepath,
         BOOL fRemoveExtraFiles,
         IXtfDeployCallback *pCallback,
         BOOL *pfCanceled,
         int *pdwResult,
         LPBSTR pbstrPackageFullName,
         LPBSTR pbstrAumidJson
)  
```

### Parameters

*pszDeployFilepath*\
Type: LPCWSTR

The source path for the content that is going to be deployed.

*fRemoveExtraFiles*\
Type: BOOL

Specify TRUE to remove files that are already on the development console but are not part of the deployment package; otherwise, FALSE to keep them.

*pCallback*\
Type: IXtfDeployCallback\*

A pointer to the [IXtfDeployCallback](https://docs.xbox.com/reference/tools/xtf/xtfapplication/classes/IXtfDeployCallback/ixtfdeploycallback-xtfapplication-xbox-microsoft-t.md) callback to invoke when a trackable action occurs during the deployment. Set to `nullptr` if you do not want callbacks during deployment.

*pfCanceled*\
Type: BOOL\*

A pointer that receives a Boolean value that indicates whether deployment was canceled.

*pdwResult*\
Type: int\*

A pointer that receives the HRESULT of the deployment operation. For example, if an open file handle prevents a file from being deleted, this parameter receives the HRESULT error code.

*pbstrPackageFullName*\
Type: LPBSTR

A pointer that receives the full name of the deployed app package, including the version number, architecture, and culture.

*pbstrAumidJson*\
Type: LPBSTR

A pointer that receives a JSON representation of a list of the AUMIDs associated with the app package. All AUMIDs in the list share the same `PackageFamilyName`, but have different AppIds after the exclamation mark ("!") in each AUMID.

### Return value

Type: HRESULT

Returns `S_OK` if successful; otherwise, returns an HRESULT error code.

## Remarks

This method performs a push deployment of your title onto an XBOX dev kit for testing. Your title is deployed to the title scratch drive, in the folder specified in `pszDeployFilepath`. After the method successfully completes the deployment, your title is ready to launch. For more information about deploying app packages, see [Deploying your title to your XBOX Development Kit (NDA topic)](https://docs.xbox.com/home/setup-install/concepts/deployment.md).

> [!NOTE]
>
> This function runs synchronously.

This method is similar to the `xbapp deploy` command from the Application Management (xbapp.exe) tool,  included as part of the XBOX Tools Framework (XTF). For more information about the `xbapp deploy` command, see [Application Management (xbapp.exe) (NDA topic)](https://docs.xbox.com/tools/tools-console/commandlinetools/xbapp.md).

### Handling LPBSTR pointers

For more information about handling LPBSTR pointers returned by this function, see [Allocating and Releasing Memory for a BSTR](https://learn.microsoft.com/cpp/atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr?view=vs-2019).

## Requirements

**Header:** xtfapplication.h

**Library:** xtfapplication.lib

**Supported platforms:** Windows (for XBOX console tools)

## See also

[IXtfApplicationClient](https://docs.xbox.com/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/ixtfapplicationclient-xtfapplication-xbox-microsoft-t.md)\
[XtfApplication](https://docs.xbox.com/reference/tools/xtf/xtfapplication/xtfapplication-xbox-microsoft-n.md)


## Related topics

- [DeployEx](https://docs.xbox.com/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/methods/ixtfapplicationclient-deployex.md)
- [OnDeployInitialized](https://docs.xbox.com/reference/tools/xtf/xtfapplication/classes/IXtfDeployCallback/methods/ondeployinitialized-ixtfdeploycallback-xtfapplication-xbox-wi.md)
- [OnDeployMetrics](https://docs.xbox.com/reference/tools/xtf/xtfapplication/classes/IXtfDeployCallback/methods/ondeploymetrics-ixtfdeploycallback-xtfapplication-xbox-window.md)
- [OnDeployError](https://docs.xbox.com/reference/tools/xtf/xtfapplication/classes/IXtfDeployCallback/methods/ondeployerror-ixtfdeploycallback-xtfapplication-xbox-windows.md)
- [DeployToTitleScratch](https://docs.xbox.com/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/methods/ixtfapplicationclient-deploytotitlescratch.md)
