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

# XtfRegisterNetworkSharePackage

> XtfRegisterNetworkSharePackage

# XtfRegisterNetworkSharePackage

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

<a id="syntaxSection" />

## Syntax

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

<a id="ID4ET" />

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

<a id="ID4E1" />

### Return value

Type: HRESULT

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

<a id="remarks" />

## Remarks

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

Use [XtfGetPackageFullName](/reference/tools/xtf/xtfapi/functions/xtfgetpackagefullname-xtfapi-xbox-windows-m), [XtfGetCountofAppUserModelIds](/reference/tools/xtf/xtfapi/functions/xtfgetcountofappusermodelids-xtfapi-xbox-windows-m), and [XtfGetAumid](/reference/tools/xtf/xtfapi/functions/xtfgetaumid-xtfapi-xbox-windows-m) to retrieve information from the packageInfo object. Use [XtfClosePackageInfo](/reference/tools/xtf/xtfapi/functions/xtfclosepackageinfo-xtfapi-xbox-windows-m) 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)](/tools/tools-console/commandlinetools/xtf-transport-errors)\
[Additional Xtf APIs](/reference/tools/xtf/xtfapi/atoc-xtfapi)


## Related topics

- [XtfGetPackageFullName](/reference/tools/xtf/xtfapi/functions/xtfgetpackagefullname-xtfapi-xbox-windows-m.md)
- [XtfGetAumid](/reference/tools/xtf/xtfapi/functions/xtfgetaumid-xtfapi-xbox-windows-m.md)
- [XtfGetCountofAppUserModelIds](/reference/tools/xtf/xtfapi/functions/xtfgetcountofappusermodelids-xtfapi-xbox-windows-m.md)
- [XtfClosePackageInfo](/reference/tools/xtf/xtfapi/functions/xtfclosepackageinfo-xtfapi-xbox-windows-m.md)
- [XtfRegisterPackage](/reference/tools/xtf/xtfapi/functions/xtfregisterpackage-xtfapi-xbox-windows-m.md)
