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

# XtfRegisterNetworkSharePackage

> XtfRegisterNetworkSharePackage

Registers a package for [Run from PC Deployment (NDA topic)](https://docs.xbox.com/home/setup-install/concepts/deployment.md).\
\[!NOTE] In this release, the password text is not encrypted when it is passed over the network to the console by [XtfRegisterNetworkSharePackage](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfregisternetworksharepackage-xtfapi-xbox-windows-m.md). See [Run from PC Deployment (NDA topic)](https://docs.xbox.com/home/setup-install/concepts/deployment.md) for more information on how to create a low privilege user account for use with this feature.

## Syntax

```cpp theme={null}
HRESULT XtfRegisterNetworkSharePackage(
         LPCWSTR address,
         LPCWSTR sharePath,
         LPCWSTR userName,
         LPCWSTR password,
         XtfPackageInfo *packageInfo
)  
```

### Parameters

*address*\
Type: LPCWSTR

\[in] Address of the console.

*sharePath*\
Type: LPCWSTR

\[in] The path to the share on a Dev PC to register.

*userName*\
Type: LPCWSTR

\[in] User name to use in domain\user format. Can be L"".

*password*\
Type: LPCWSTR

\[in, out] Password for the user. Not encrypted. Can be L"".

*packageInfo*\
Type: XtfPackageInfo \*

\[out] Package information object about the package that was registered.

### Return value

Type: HRESULT

A return value of **S\_OK** indicates the function succeeded. Any other value indicates an unexpected error occurred.

## Remarks

If userName and password are equal to L"", the credentials registered for sharePath using [XtfAddCredential](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfaddcredential-xtfapi-xbox-windows-m.md) are used.

Use [XtfGetPackageFullName](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfgetpackagefullname-xtfapi-xbox-windows-m.md), [XtfGetCountofAppUserModelIds](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfgetcountofappusermodelids-xtfapi-xbox-windows-m.md), and [XtfGetAumid](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfgetaumid-xtfapi-xbox-windows-m.md) to retrieve information from the packageInfo object. Use [XtfClosePackageInfo](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfclosepackageinfo-xtfapi-xbox-windows-m.md) to free the packageInfo object when you are done with it.

## Requirements

**Header:** xtfapi.h

**Library:** XtfApi.lib

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

## See also

[XTF Transport Errors (NDA topic)](https://docs.xbox.com/tools/tools-console/commandlinetools/xtf-transport-errors.md)\
[Additional Xtf APIs](https://docs.xbox.com/reference/tools/xtf/xtfapi/atoc-xtfapi.md)


## Related topics

- [XtfGetPackageFullName](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfgetpackagefullname-xtfapi-xbox-windows-m.md)
- [XtfGetAumid](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfgetaumid-xtfapi-xbox-windows-m.md)
- [XtfGetCountofAppUserModelIds](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfgetcountofappusermodelids-xtfapi-xbox-windows-m.md)
- [XtfClosePackageInfo](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfclosepackageinfo-xtfapi-xbox-windows-m.md)
- [Additional Xtf APIs (API contents)](https://docs.xbox.com/reference/tools/xtf/xtfapi/atoc-xtfapi.md)
