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

# XtfRegisterAllPackagesOnDrive

> XtfRegisterAllPackagesOnDrive

# XtfRegisterAllPackagesOnDrive

Register all packages deployed on the specified drive.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
HRESULT XtfRegisterAllPackagesOnDrive(
         LPCWSTR address,
         DWORD drive,
         LPBSTR pbstrPackageList
)  
```

<a id="parametersSection" />

### Parameters

*address*<br />Type: LPCWSTR

\[in] The address of the console.

*drive*<br />Type: DWORD

\[in] The drive to register the packages on. This parameter accepts the following values:

| Value | Description                               |
| ----- | ----------------------------------------- |
| 0     | Retail drive                              |
| 1     | Development drive                         |
| 2 - 8 | External drive 1 through external drive 7 |

*pbstrPackageList*<br />Type: LPBSTR

\[out] Information about the packages and apps that were registered.

<a id="retvalSection" />

### Return value

Type: HRESULT

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

<a id="remarksSection" />

## Remarks

This function registers all packages deployed on the specified drive, such as an external drive, and provides a stringified JSON object in *pbstrPackageList*. The JSON object is an array that provides the package full name and the apps, including the Application User Model IDs (AUMIDs), for each registered package.

For more information about managing applications, see [Application Management (xbapp.exe) (NDA topic)](/tools/tools-console/commandlinetools/xbapp).

<a id="requirementsSection" />

## Requirements

**Header:** xtfapi.h

**Library:** XtfApi.lib

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

<a id="seealsoSection" />

## See also

[Run from PC Deployment (NDA topic)](/home/setup-install/concepts/deployment)<br />[XTF Transport Errors (NDA topic)](/tools/tools-console/commandlinetools/xtf-transport-errors)<br />[Additional Xtf APIs](/reference/tools/xtf/xtfapi/atoc-xtfapi)


## Related topics

- [XtfRegisterPackageOnDrive](/reference/tools/xtf/xtfapi/functions/xtfregisterpackageondrive-xtfapi-xbox-windows-m.md)
- [XtfUnregisterPackage](/reference/tools/xtf/xtfapi/functions/xtfunregisterpackage-xtfapi-xbox-windows-m.md)
- [XtfRegisterPackage](/reference/tools/xtf/xtfapi/functions/xtfregisterpackage-xtfapi-xbox-windows-m.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)
