Adds credentials (user name and password) to the given console for use by Run from PC Deployment.
Note In this release, the password text is not encrypted when it is passed over the network to the console by XtfAddCredential. See Run from PC Deployment for more information on how to create a low privilege user account for use with this feature.
HRESULT XtfAddCredential(
LPCWSTR address,
LPCWSTR targetName,
LPCWSTR userName,
LPCWSTR password
)
address
Type: LPCWSTR
[in] Address of the console.
targetName
Type: LPCWSTR
[in] Target server or share name.
userName
Type: LPCWSTR
[in] User name to use. Format is domain\user.
password
Type: LPCWSTR
[in] Password for the user.
Type: HRESULT
A return value of S_OK indicates the function succeeded. Any other value indicates an unexpected error occurred.
Use XtfAddCredential to add credentials. Use XtfRemoveCredential to remove credentials. Use XtfGetCredentialInfoList, XtfGetCredentialCount, XtfGetCredentialServerName, and XtfGetCredentialUserName to enumerate the current list of stored credentials. Use XtfCloseCredentialInfoList to free the XtfNetworkCredentials returned by XtfGetCredentialInfoList.
See XtfGetCredentialInfoList for an example of how to use this API.
Note When the console is rebooted all stored credentials are lost and must be added again.
Header: Declared in XtfApi.h.
Library: Use XtfApi.lib.