自訂工作列Customize the Taskbar

您最多可以將三個額外的應用程式釘選到工作列。You can pin up to three additional apps to the taskbar. 有兩種方法可以執行此作業:There are two methods to do this:

  • (建議的 工作列版面配置修改 XML 方法) Taskbar Layout Modification XML method (recommended)

    • 支援 multivariant 映射;您可以為不同區域指定不同組的工作列版面配置。Supports multivariant images; you can specify different sets of taskbar layouts for different regions.
    • 使用單一 XML 檔案。Uses a single XML file.
    • 是唯一可讓您將 UWP 應用程式新增至工作列的方法。Is the only method that allows you to add UWP apps to the taskbar.
    • 在下列範例中,會使用檔案名 "TaskbarLayoutModification.xml",不過,您可以選擇任何想要的名稱。In the examples below, the file name “TaskbarLayoutModification.xml” is used, however, you can choose any name you like.
  • Windows 10 仍支援傳統的自動安裝方法 (,但標示為已淘汰,未來的組建可能無法使用此 方法 ) Classic Unattend method (still supported in Windows 10, but marked as deprecated, and may not be available in future builds)

工作列以下列連結開頭: [ 開始 ]、[ 搜尋 ] 和 [工作 視圖 ],再加上四個額外的 Windows 提供連結: Mail、Edge、檔案總管和 Store。The taskbar starts with the following links: Start , Search , and Task View , plus four additional Windows-provided links: Mail, Edge, File Explorer, and Store. 無法移除或取代這些 pin。These pins cannot be removed or replaced.

Oem 最多可將三個額外的釘選應用程式新增至工作列。OEMs can add up to three additional pinned apps to the taskbar.

若為從左至右的語言,則會從左至右排序工作列圖示 (開始、搜尋、工作視圖、Windows 提供的 Pin、OEM 提供的 pin、郵件) 。For left-to-right languages, the taskbar icons are ordered from left to right (Start, Search, Task View, Windows-provided Pins, OEM-provided pins, Mail). 如果 是由右 至左的語言,工作列圖示的順序會與最右邊的元素相同。For right-to-left languages, the taskbar icons are in the opposite order, with the right-most element being Start.

新增預設路徑Add a default path

若要在 Windows 中使用工作列版面配置修改 XML 檔案,您必須將登錄機碼 (LayoutXMLPath) 新增至映射,然後將映射一般化並重新捕獲。To use a Taskbar Layout Modification XML file in Windows, you’ll need to add a registry key (LayoutXMLPath) to the image, and then generalize and recapture the image. 登錄機碼必須在 specialize 設定階段之前處理。The registry key must be processed before the specialize configuration pass. 這表示您將無法只使用同步命令/FirstLogonCommands 新增登錄機碼,除非您打算之後將映射一般化。This means you won’t be able to simply add the registry key by using Synchronous Commands/FirstLogonCommands unless you plan to generalize the image afterwards.

建議您使用檔案位置 C:\Windows\OEM\TaskbarLayoutModification.xml ,因為這是用於 推播按鈕重設自動套用資料夾的預設路徑。We recommend using the file location C:\Windows\OEM\TaskbarLayoutModification.xml, because this is the default path used for Push-button reset auto-apply folders.

另一個快捷方式檔案、應用程式和工作列版面配置修改檔案本身可以透過一般的影像處理技術來隨時變更。The other shortcut files, apps, and the Taskbar Layout Modification file itself can be changed at any time through regular imaging techniques. 您可以將這個登錄機碼新增至所有映射,即使您想要使用傳統的自動安裝方法來新增工作列連結也一樣。You can add this registry key to all your images, even if you intend to add taskbar links using the Classic Unattend method.

設定 taskbarlayoutmodification.xmlConfigure taskbarlayoutmodification.xml

  1. 將 Windows 映像安裝到技術人員電腦上。Install the Windows image to a technician computer.

  2. 映射開機之後,請按 CTRL + SHIFT + F3 進入 audit 模式。After the image boots, go into audit mode by pressing CTRL+SHIFT+F3.

  3. 新增下列登錄機碼來定義工作列版面配置修改檔案的預設位置:Add the following registry key to define a default location for the Taskbar Layout Modification file:

    cmd /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ /v LayoutXMLPath /d C:\Windows\OEM\TaskbarLayoutModification.xml

  4. 在預設位置中加入工作列配置修改檔案 ( # A0) ,例如: C:\Windows\OEM\TaskbarLayoutModification.xmlAdd a Taskbar Layout Modification file (TaskbarLayoutModification.xml) in the default location, for example: C:\Windows\OEM\TaskbarLayoutModification.xml. 我們也建議您放置檔案的備份副本,如此一來,就會在 C:\Recovery\AutoApply\TaskbarLayoutModification.xml 重設按鈕時還原檔案。We also recommend placing a backup copy of the file at C:\Recovery\AutoApply\TaskbarLayoutModification.xml so it will be restored during a push-button reset.

    <?xml version="1.0" encoding="utf-8"?>
    <LayoutModificationTemplate
    xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
    xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
    xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
    xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout"
    Version="1">
    
    <CustomTaskbarLayoutCollection PinListPlacement="Replace">
        <defaultlayout:TaskbarLayout>
            <taskbar:TaskbarPinList>
                <taskbar:UWA AppUserModelID="Microsoft.Windows.Photos_8wekyb3d8bbwe!App" />
                <taskbar:DesktopApp DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Paint.lnk"/>
            </taskbar:TaskbarPinList>
        </defaultlayout:TaskbarLayout>
        <defaultlayout:TaskbarLayout Region="US|GB">
            <taskbar:TaskbarPinList >
                <taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\Accessories\Notepad.lnk" />
                <taskbar:UWA AppUserModelID="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
            </taskbar:TaskbarPinList>
        </defaultlayout:TaskbarLayout>
        <defaultlayout:TaskbarLayout Region="CN|TW">
            <taskbar:TaskbarPinList>
                <taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\Accessories\Notepad.lnk" />
                <taskbar:UWA AppUserModelID="Microsoft.Windows.Photos_8wekyb3d8bbwe!App" />
                <taskbar:DesktopApp DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Paint.lnk"/>
            </taskbar:TaskbarPinList>
        </defaultlayout:TaskbarLayout>
    </CustomTaskbarLayoutCollection>
    </LayoutModificationTemplate>
    
  5. 使用 Sysprep將 Windows 映像一般化:Generalize the Windows image using Sysprep:

    Sysprep /generalize /oobe /shutdown

  6. 開機至 Windows PE。Boot to Windows PE.

  7. 重新捕獲映射。Recapture the image. 例如︰For example:

    Dism /Capture-Image /CaptureDir:C:\ /ImageFile:c:\install-with-new-taskbar-layout.wim /Name:"Windows image with Taskbar layout"

  8. 您現在可以將此映射套用到其他電腦。You can now apply this image to other PCs.

參考您的應用程式To reference your apps

  • 若為 傳統 Windows 應用程式 ,請使用快捷方式 ( .lnk) 檔。For Classic Windows applications , use shortcut (.lnk) files. 建議您在 [所有使用者] [開始] 功能表中使用相同的快捷方式 .lnk 檔案。We recommend using the same shortcut .lnk files in the All Users Start menu. 範例:Example:

    DesktopApp
    DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Paint.lnk"
    
  • 若為 通用 windows 應用程式 ,請使用通用 windows 應用程式使用者模型識別碼。For Universal Windows apps , use the Universal Windows app user model ID. 範例:Example:

    UWA AppUserModelID="Microsoft.Windows.Photos_8wekyb3d8bbwe!App"

注意

不支援 url 檔案的連結。Links to .url files are not supported.

針對不同區域使用不同的版面配置To use different layouts for different regions

若要針對不同區域使用不同的版面配置,請在 defaultlayout 標記中包含區域。To use different layouts for different regions, include a region in the defaultlayout tag. 這些區域使用 適用于 Windows 的可用語言套件中所列的後半個語言/區域標記。These regions use the second half of the language/region tags listed in Available Language Packs for Windows. 您可以使用多個區域標記,並以管道 () 字元。You can use multiple region tags separated by a pipe (|) character. 以下是將釘選到中文 (PRC) 和中文 (臺灣) 區域的範例:Here is an example of adding pins to the Chinese (PRC) and Chinese (Taiwan) regions:

<defaultlayout:TaskbarLayout Region="CN|TW">

Windows 如何剖析自動安裝和工作列版面配置修改 XML 的設定How Windows parses the setting for Unattend and Taskbar Layout Modification XML

當您轉換至新的方法以自訂工作列時,最後可能會使用仍包含舊的自動安裝 TaskbarLinks 設定的現有映射。While you’re transitioning to the new method to customize the taskbar, you may end up using existing images that still include your old Unattend TaskbarLinks settings. 發生這種情況時:When that happens:

  1. 如果 Windows 找到有效的工作列版面配置修改 XML 檔案,則會使用 XML 檔案,並忽略任何自動安裝工作列設定。If Windows finds a valid Taskbar Layout Modification XML file, it uses the XML file, and ignores any of the Unattend taskbar settings.
  2. 如果找不到工作列配置修改 XML 檔案,或其無效,則 Windows 會尋找舊的自動安裝 TaskbarLinks 設定。If the Taskbar Layout Modification XML file isn't found, or is invalid, Windows looks for the old Unattend TaskbarLinks settings. 如果找到,則會使用它們。If it finds them, it uses them.
  3. 如果 Windows 找不到有效的工作列版面配置修改 XML 檔案或自動安裝 TaskbarLink 設定,則只會顯示 Windows 提供的釘選和 開始搜尋 和工作 視圖If Windows can't find either a valid Taskbar Layout Modification XML file, or Unattend TaskbarLink settings, then only the Windows-provided pins and Start , Search , and Task View are shown.

設定工作列的透明度Set transparency for the taskbar

工作列的預設透明度設定為15%。The default transparency setting for the taskbar is 15%. 若要讓工作列使用 OLED 顯示器上的深色模式,您必須將工作列透明度設定為40%。To make Taskbar work with the Dark Mode on OLED displays, you need to set the taskbar transparency to 40%.

若要設定工作列的透明度,請建立名為 "UseOLEDTaskbarTransparency" 的登錄機碼,並將它放在下列位置:To set the transparency for the Taskbar, create a registry key called “UseOLEDTaskbarTransparency” and place it in the following location:

HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced

重要

此登錄機碼只能用來變更 OLED 畫面的工作列透明度。This registry key should only be used to change the taskbar transparency for OLED screens. 我們不建議您變更非 OLED 顯示器上的預設透明度。We do not advise changing the default transparency on non-OLED displays.

控制中心Action Center

釘選在動作中心內的大部分快速動作磚都無法自訂。Most quick action tiles that are pinned in the Action Center are not customizable. 但是,如果裝置上已安裝一個以上的色彩設定檔,您可以啟用其中一個桌面快速動作磚( 色彩設定檔 )。You can, however, enable one of the desktop quick action tiles, Color Profile , if more than one color profile is installed on the device. 依預設,無法使用此快速動作磚。By default, this quick action tile is not available. 若要讓使用者在動作中心看到色彩設定檔:To let users see Color Profile in the Action Center:

  1. 在主顯示器上至少安裝兩個 ICC 色彩設定檔。Install at least two ICC color profiles on the primary display. 如需有關如何完成此步驟的更多資訊,請與您的 Microsoft 代表合作。For more information on how to accomplish this, please work with your Microsoft representative.

  2. 新增下列登錄機碼,以啟用 Microsoft.quickaction.colorprofile。 Colorprofile 控制項目的快速動作: HKLM\Software\Microsoft\Windows\Shell\OEM\QuickActions\ColorProfileQuickAction = 0x1 (DWORD) Add the following registry key to enable the Microsoft.QuickAction.ColorProfile quick action: HKLM\Software\Microsoft\Windows\Shell\OEM\QuickActions\ColorProfileQuickAction = 0x1 (DWORD)