轉換包含服務的安裝程式Convert an installer that includes services

Windows 10 2004 版中引進了執行包含服務之 MSIX 套件的支援。Windows 10, version 2004, introduces support for running an MSIX package that includes services. 您可以使用 MSIX 封裝工具來取得服務的現有安裝程式,並將其轉換成 MSIX。You can use the MSIX Packaging Tool to take an existing installer with services and convert it to MSIX. 這項支援是從2020年1月發行的 MSIX 封裝工具 (1.2019.1220.0) 。This support is as of the January 2020 release of the MSIX Packaging Tool(1.2019.1220.0). 當您有服務的封裝 MSIX 之後,它將需要系統管理員許可權才能在電腦上安裝。Once you have a packaged MSIX with a service, it will require admin privileges to install on a machine.

InstructionsInstructions

若要轉換包含服務的安裝程式,請使用 MSIX 封裝工具,就像使用任何 應用程式封裝一樣。To convert an installer that includes services, use the MSIX Packaging Tool as you would with any application package. 選取具有服務的安裝程式,您將會在最後一個步驟之前看到 [ 服務 報表] 頁面,以建立 MSIX 套件。Select an installer that has services, and you will see the Services report page before the final step to create your MSIX package.

[ 服務 報表] 頁面會列出在轉換期間于安裝程式中偵測到的服務。The Services report page lists services that were detected in your installer during conversion. 內含的表格中將會顯示擁有所需且受支援之所有資訊的服務。Services that have all the information they need and are supported will be shown in the Included table. 排除的表格中將會顯示需要其他資訊、需要修正或不支援的服務。Services that need additional information, need a fix, or aren’t supported will be shown in the Excluded table.

若要修正服務或查看與服務有關的其他資料,請按兩下資料表中的服務專案,以查看具有服務詳細資訊的快顯視窗。To fix a service or see additional data about the service, double-click the service entry in the table to view a pop-up with more information about the service. 您可以視需要編輯這部分資訊。You can edit some of this information if you need to.

  • 索引鍵名稱: 服務的名稱。Key name: The name of the service. 這是不可編輯的。This is not editable.
  • 描述: 服務專案的描述。Description: The description of the service entry.
  • 顯示名稱: 服務的顯示名稱。Display name: The display name of the service.
  • 映射路徑: 服務可執行檔的位置。Image path: Location of the service executable. 這是不可編輯的。This is not editable.
  • 啟動帳戶: 服務的啟動帳戶。Start account: The start account for the service.
  • 啟動類型: 服務的啟動類型。Startup type: Type of startup for the service. 支援 自動手動停用Supports Automatic, Manual, and Disabled.
  • 引數: 當服務啟動時要執行的引數。Arguments: Arguments to be run when the service starts.
  • 相依性 服務的相依性。Dependencies: Dependencies for the service.

修正服務之後,您可以將它移到 包含 的資料表,或者,如果您不想要將它放在您的最終封裝中,可以選擇將它保留在 排除 的資料表中。After a service has been fixed, you can move it to the Included table or you can choose to leave it in the Excluded table if you don’t want it in your final package. 然後,您可以繼續進行最後一個步驟來建立 MSIX 套件。Then, you can continue to the final step to create your MSIX package.

已知限制Known limitations

服務可執行檔路徑 (也稱為映射路徑) 目前無法編輯。The services executable path (also called the image path) is currently not editable. 若要修正路徑的任何問題,您必須先手動編輯您的服務可執行檔路徑,再轉換您的安裝程式。To fix any issues with your path, you must manually edit your service executable path before converting your installer. 或者,在轉換之後,您可以使用 MSIX 封裝工具中的 封裝編輯器 ,以手動方式編輯資訊清單。Alternatively, after conversion you can edit the manifest manually using the Package Editor in the MSIX Packaging Tool.

封裝編輯器中目前無法使用服務報告。The Services report is currently not available in the Package Editor. 您必須手動編輯資訊清單,以對 MSIX 套件中包含的服務進行變更。You must manually edit the manifest to make changes to the services included in your MSIX package.

我們目前不支援在套件之外具有相依性的服務。We currently do not support services with dependencies outside the package.

使用您的資訊清單手動新增服務Add a service manually using your manifest

如果您要手動將服務新增至您的應用程式,則必須將 服務新增 至您的應用程式資訊清單。If you are manually adding a service to your application, you will need to add a service to your app manifest. 這需要有 限制的功能 ,才能將應用程式新增至您的應用程式。This does require a restricted capability to add to your application.