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