DesktopBackgroundDesktopBackground

DesktopBackground 指定用于桌面背景的图形文件的路径。DesktopBackground specifies the path to a graphic file that is used for the desktop background. 桌面背景图像可以驻留在 %windir%下的任何子文件夹。The desktop background image can reside in any subfolder under %windir%. 桌面背景只可以中的默认主题设置。The desktop background can only be set in the default theme.

会裁剪图像以适合你的显示器,同时保留图像的纵横比的大小。The image will be cropped to fit the size of your display, while preserving the aspect ratio of the image.

选择一个映像,它看上去很好时裁剪为常见的长宽比,为您的计算机。Select an image which will look good when cropped to the common aspect ratios for your computer. 在大多数情况下,我们建议中心附近的图像的焦点使用 1920 x 1200 映像。In most cases, we recommend that you use a 1920x1200 image with the focal point of the image near the center.

图形可以具有任何名称,但必须是.png、.jpg 或.bmp 图像。The graphic can have any name, but must be a .png, .jpg, or .bmp image.

备注

在 Windows 10 中,如果使用此设置,您还需要设置 ThemeName。In Windows 10, if you use this setting, you’ll also need to set ThemeName. 如果将这两个设置 (ThemeName 和 DesktopBackground),Windows 将为您创建主题。If you set these two settings (ThemeName and DesktopBackground), Windows will create the theme for you.

Values

Path_to_background_image_filePath_to_background_image_file

指定图形文件的路径。Specifies the path to the graphic file. Path_to_background_image_file是最大长度 259 个字符的字符串。Path_to_background_image_file is a string with a maximum length of 259 characters.

此字符串类型支持空元素。This string type supports empty elements.

有效配置阶段Valid Configuration Passes

专用化specialize

auditSystemauditSystem

auditUserauditUser

oobeSystemoobeSystem

父层次结构Parent Hierarchy

Microsoft-Windows-Shell-Setup | Themes | DesktopBackgroundMicrosoft-Windows-Shell-Setup | Themes | DesktopBackground

适用于Applies To

Windows 版本和体系结构,该组件支持的列表,请参阅Microsoft Windows Shell 安装For a list of the Windows editions and architectures that this component supports, see Microsoft-Windows-Shell-Setup.

XML 示例XML Example

以下 XML 输出显示了如何将背景分配到自定义主题。The following XML output shows how to assign a background to a customized theme.

<settings pass="oobeSystem">
    <component processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" name="Microsoft-Windows-Shell-Setup" language="neutral">
        <Themes>
            <ThemeName>Fabrikam Theme</ThemeName>
            <DesktopBackground>%WINDIR%\web\wallpaper\fabrikam.jpg</DesktopBackground>
        </Themes>
    </component>
</settings>

主题Themes