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

# MicrosoftGame.config Element - DisableRegistryWriteVirtualization (DEPRECATED)

> MicrosoftGame.config Element - DisableRegistryWriteVirtualization (DEPRECATED)

# MicrosoftGame.config Element - DisableRegistryWriteVirtualization (DEPRECATED)

如果你的游戏必须进行操作系统级的注册表写入，则设置为 true。

## 父元素

此元素的父元素是 DesktopRegistration 元素。

## 要求

此元素为可选，无需设置。

## 平台

此元素仅适用于 PC 设备。

## 行为

* 无属性。
* 默认值为 false。
* 允许值为 true 或 false。

## 备注

* 自 2022 年 3 月 Microsoft Game Development Kit (GDK) 起，由于包安装方式的变更，此元素现已弃用。有关详细信息，请参阅[平面文件安装概述](/build/core-features/common/packaging/packaging-flatfileinstall)。
* 如果在你的 MicrosoftGame.config 中设置了此元素，在 2022 年 3 月的 Microsoft Game Development Kit (GDK) 及未来版本中，此元素将被忽略。
* 如果这些元素出现在已更新为 `Game configVersion="1"` 的 MicrosoftGame.config 中，尝试打包标题时将出现错误。错误信息将输出 "The DesktopRegistration entries "modFolder", "enableWritesToPackageRoot", "disableRegistryWriteVirtualization" and "disableFilesystemWriteVirtualization" are deprecated in configVersion >= 1"。从 MicrosoftGame.config 中删除这些元素将解决此问题。有关 `Game configVersion="1"` 及其是否影响你的标题的更多信息，请参阅 [MicrosoftGame.config 版本详细信息](/reference/system/microsoftgameconfig/microsoftgameconfig-schema#MicrosoftGameConfig-VersionDetails)。

## 另请参阅

[MicrosoftGame.config 参考 - 目录](/reference/system/microsoftgameconfig/elements/gc-microsoftgameconfig-toc)


## Related topics

- [MicrosoftGame.config Element - DisableFilesystemWriteVirtualization (DEPRECATED)](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-disablefilesystemwritevirtualization.md)
- [MicrosoftGame.config Element - EnableWritesToPackageRoot (DEPRECATED)](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-enablewritestopackageroot.md)
- [MicrosoftGame.config Element - ModFolder (DEPRECATED)](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-modfolder.md)
- [MicrosoftGame.config Element - DesktopRegistration](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-desktopregistration.md)
- [Flat File Install 概述](/zh-CN/build/core-features/common/packaging/packaging-flatfileinstall.md)
