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

# IXtfApplicationClient::Deploy

> IXtfApplicationClient::Deploy

# IXtfApplicationClient::Deploy

Deploys the specified app package.

<a id="syntaxSection" />

## Syntax

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

<a id="parametersSection" />

### Parameters

*pszDeployFilepath*<br />Type: LPCWSTR

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

*fRemoveExtraFiles*<br />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*<br />Type: IXtfDeployCallback\*

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

*pfCanceled*<br />Type: BOOL\*

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

*pdwResult*<br />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*<br />Type: LPBSTR

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

*pbstrAumidJson*<br />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.

<a id="retvalSection" />

### Return value

Type: HRESULT

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

<a id="remarksSection" />

## 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)](/home/setup-install/concepts/deployment).

<Note>
  This function runs synchronously.
</Note>

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)](/tools/tools-console/commandlinetools/xbapp).

<a id="remarks_output" />

### 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).

<a id="requirementsSection" />

## Requirements

**Header:** xtfapplication.h

**Library:** xtfapplication.lib

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

<a id="seealsoSection" />

## See also

[IXtfApplicationClient](/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/ixtfapplicationclient-xtfapplication-xbox-microsoft-t)<br />[XtfApplication](/reference/tools/xtf/xtfapplication/xtfapplication-xbox-microsoft-n)


## Related topics

- [IXtfDeployCallback::OnDeployExtraFileRemoved](/reference/tools/xtf/xtfapplication/classes/IXtfDeployCallback/methods/ondeployextrafileremoved-ixtfdeploycallback-xtfapplication-xb.md)
- [IXtfApplicationClient::DeployEx](/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/methods/ixtfapplicationclient-deployex.md)
- [IXtfApplicationClient::DeployToTitleScratch](/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/methods/ixtfapplicationclient-deploytotitlescratch.md)
- [IXtfApplicationClient::Uninstall](/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/methods/uninstall-ixtfapplicationclient-xtfapplication-xbox-microsoft-m.md)
- [XtfCreateApplicationClient](/reference/tools/xtf/xtfapplication/methods/xtfcreateapplicationclient-xtfapplication-xbox-microsoft-m.md)
