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

# SetConfigValue

> IXtfConsoleControlClient::SetConfigValue

Sets the value of the specified configuration setting.

## Syntax

```cpp theme={null}
HRESULT SetConfigValue(
         LPCWSTR pszKey,
         LPCWSTR pszValue
)  
```

### Parameters

*pszKey*\
Type: LPCWSTR

A pointer to the name of the configuration setting to set the value of.

*pszValue*\
Type: LPCWSTR

A pointer to the value to set for the configuration setting specified in *pszKey*.

### Return value

Type: HRESULT

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

## Remarks

This function sets the value of a single configuration setting for the current development console. If `pszKey` is set to the pointer of a string that contains a valid name (or key) of a configuration setting, the function returns `S_OK` and sets the value of the configuration setting to the string at the pointer specified in `pszValue`. Otherwise, the function returns an error.

For more information about accessing configuration settings using XBOX Tools Framework (XTF), see [Configuration (xbconfig.exe) (NDA topic)](https://docs.xbox.com/tools/tools-console/commandlinetools/xbconfig.md).

## Requirements

**Header:** xtfconsolecontrol.h

**Library:** xtfconsolecontrol.lib

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

## See also

[IXtfConsoleControlClient::GetConfigValue](https://docs.xbox.com/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getconfigvalue.md)\
[IXtfConsoleControlClient](https://docs.xbox.com/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/ixtfconsolecontrolclient.md)\
[XtfConsoleControl](https://docs.xbox.com/reference/tools/xtf/xtfconsolecontrol/xtfconsolecontrol_members.md)


## Related topics

- [IXtfConsoleControlClient (Interface contents)](https://docs.xbox.com/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/ixtfconsolecontrolclient.md)
- [GetConfigValue](https://docs.xbox.com/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getconfigvalue.md)
- [XNetworkingSetConfigurationSetting](https://docs.xbox.com/reference/networking/xnetworking/functions/xnetworkingsetconfigurationsetting.md)
- [XblConfigSetting](https://docs.xbox.com/reference/live/xsapi-c/xbox_live_global_c/enums/xblconfigsetting.md)
- [XNetworkingConfigurationSetting](https://docs.xbox.com/reference/networking/xnetworking/enums/xnetworkingconfigurationsetting.md)
