如何產生命令列轉換的範本檔案How to generate a template file for command line conversions

使用 MSIX 封裝工具,您可以透過兩種方式來執行轉換:透過互動式 UI 或透過我們的命令列選項。With the MSIX Packaging Tool, you can perform the conversion in two ways: through the interactive UI or through our command line option. 使用命令列時,您必須提供範本檔案,讓轉換能夠與您的特定設定和需求搭配運作。When using the command line, you need to provide a template file so that the conversion works with your specific settings and needs. 本文將協助引導您完成產生範本檔案的程式,以適合您。This article will help guide you through the process of generating a template file that works for you.

有兩種方式可以取得適用于您的範本檔案:There are two ways that you can get a template file that works for you:

  • 您可以使用 MSIX 封裝工具的 UI。You can use the UI of the MSIX Packaging Tool. 在此工具的 [設定] 中,您可以指定要使用您所建立的每個 MSIX 封裝來產生轉換範本檔案。In the settings of the tool, you can specify that you want to generate a conversion template file with each MSIX package that you create.
  • 您可以取得範例範本,並手動輸入每次轉換時所需的設定。You can take a sample template and manually enter the configurations that you need for each conversion.

從 MSIX 封裝工具產生轉換範本檔案Generate a conversion template file from the MSIX Packaging Tool

  1. 啟動 MSIX 封裝工具。Launch the MSIX Packaging Tool.
  2. 移至應用程式右上角的 [設定]。Go to the settings in the top right corner of the application.
  3. 請確定已選取 [使用每個封裝產生命令列檔案] 選項。Make sure that the 'Generate a command line file with each package' option is selected.
  4. 對您所需的設定進行任何其他變更或修改(例如排除專案、結束代碼)。Make any other changes or modifications to your settings that you need (e.g. exclusion items, exit codes).
  5. 儲存設定Save the settings
  6. 使用安裝程式來完成應用程式套件工作流程。Go through the Application Package workflow using an installer.
    • 如果您未選取安裝程式,將無法產生轉換範本檔案。If you don't select an installer, you will not be able to generate a conversion template file.
    • 如果您使用 exe,您必須將無訊息旗標傳遞給安裝程式,以產生轉換範本檔案。If you are using an exe, you will need to pass a silent flag to your installer to generate the conversion template file.
  7. 在轉換結束時,您將會有根據您選擇的安裝程式設定的範本檔案,以及您現在可以重複用於未來轉換的目前設定。At the end of the conversion, you will have a template file configured based on the installer you chose, and your current settings which you can now re-use for future conversions.
    • 根據預設,轉換範本檔案會儲存在 MSIX 套件所在的相同位置,但您可以在 [建立封裝] 頁面上為您的範本檔案指定個別的儲存位置。By default, the conversion template file will be saved in the same location as your MSIX package, but you can specify a separate save location for your template file on the Create package page.
    • 您仍然需要根據每次轉換結束時要輸出的 MSIX 來進行一些修改。You will still need to make some modifications based on what MSIX you want output at the end of each conversion.

手動編輯轉換範本檔案Manually edit the conversion template file

您可以手動編輯轉換範本檔案的範本參數,以產生適用于您的範本檔案。You can manually edit the template parameters for the conversion template file to generate a template file that works for you. 產生轉換範本檔案時,請注意您新增至範本檔案的功能,因為有些可能需要額外的架構參考才能正常執行。When generating the conversion template file, pay attention to which features you add into the template file, as some may require an additional schema references in order to work.

轉換範本參數參考Conversion template parameter reference

以下是可在轉換範本檔案中使用的完整參數清單。Here is the complete list of parameters that you can use in the Conversion template file.

ConversionSettingsConversionSettings 描述Description
Settings:: AllowTelemetrySettings:: AllowTelemetry [選用] 針對工具的此引動過程啟用遙測記錄。[optional] Enables telemetry logging for this invocation of the tool.
Settings:: ApplyAllPrepareComputerFixesSettings:: ApplyAllPrepareComputerFixes [選用] 套用所有建議的準備電腦修正程式。[optional] Applies all recommended prepare computer fixes. 使用其他屬性時,無法設定此項目。Cannot be set when other attributes are used.
Settings:: GenerateCommandLineFileSettings:: GenerateCommandLineFile [選用] 將範本檔案輸入複製到 SaveLocation 目錄,以供日後使用。[optional] Copies the template file input to the SaveLocation directory for future use.
Settings:: AllowPromptForPasswordSettings:: AllowPromptForPassword [選用] 指示工具提示使用者輸入虛擬機器的密碼,以及針對未指定的必要簽署憑證輸入密碼。[optional] Instructs the tool to prompt the user to enter passwords for the Virtual Machine and for the signing certificate if it is required and not specified.
Settings:: EnforceMicrosoftStoreVersioningRequirementsSettings:: EnforceMicrosoftStoreVersioningRequirements [選用] 指示工具強制執行從 Microsoft Store 和商務用 Microsoft Store 進行部署時所需的套件版本控制配置。[optional] Instructs the tool to enforce the package versioning scheme required for deployment from Microsoft Store and Microsoft Store for Business.
Settings:: ServerPortNumberSettings:: ServerPortNumber 選擇性連接到遠端電腦時使用。[optional] Used when connecting to a remote machine. 需要第2個範本架構。Requires v2 of the template schema.
Settings:: AddPackageIntegritySettings:: AddPackageIntegrity 選擇性將封裝完整性新增至每個產生的 MSIX。[optional] Adds Package Integrity to every generated MSIX. 需要 v5 的範本架構。Requires v5 of the template schema.
ValidInstallerExitCodesValidInstallerExitCodes [選擇性] 0 個或多個 ValidInstallerExitCode 元素。[optional] 0 or more ValidInstallerExitCode elements. 需要第2個範本架構。Requires v2 of the template schema.
ValidInstallerExitCodes:: ValidInstallerExitCodeValidInstallerExitCodes:: ValidInstallerExitCode 選擇性指定工具可能不熟悉或需要重新開機的任何安裝程式結束代碼。[optional] Specify any installer exit codes that the tool might not be familiar with or require a reboot. 需要第2個範本架構。Requires v2 of the template schema.
ValidInstallerExitCodes:: ValidInstallerExitCode:: RebootValidInstallerExitCodes:: ValidInstallerExitCode:: Reboot 選擇性指定結束代碼是否應該在轉換期間觸發重新開機。[optional] Specify whether an exit code should trigger a reboot during conversion. 需要範本架構的 v3。Requires v3 of the template schema.
ExclusionItemsExclusionItems [選用] 0 個或多個 FileExclusion 或 RegistryExclusion 元素。[optional] 0 or more FileExclusion or RegistryExclusion elements. 所有 FileExclusion 元素必須出現在任何 RegistryExclusion 項目之前。All FileExclusion elements must appear before any RegistryExclusion elements.
ExclusionItems::FileExclusionExclusionItems::FileExclusion [選用] 要在封裝中排除的檔案。[optional] A file to exclude for packaging.
ExclusionItems::FileExclusion::ExcludePathExclusionItems::FileExclusion::ExcludePath 要將檔案排除在封裝之外的檔案路徑。Path to file to exclude for packaging.
ExclusionItems::RegistryExclusionExclusionItems::RegistryExclusion [選用] 要在封裝中排除的登錄機碼。[optional] A registry key to exclude for packaging.
ExclusionItems::RegistryExclusion:: ExcludePathExclusionItems::RegistryExclusion:: ExcludePath 要將登錄機碼排除在封裝之外的登錄機碼路徑。Path to registry to exclude for packaging.
PrepareComputer::DisableDefragServicePrepareComputer::DisableDefragService [選用] 轉換應用程式時停用 Windows Defragmenter。[optional] Disables Windows Defragmenter while the app is being converted. 如果設定為 false,則會覆寫 ApplyAllPrepareComputerFixes。If set to false, overrides ApplyAllPrepareComputerFixes.
PrepareComputer:: DisableWindowsSearchServicePrepareComputer:: DisableWindowsSearchService [選用] 轉換應用程式時停用 Windows Search。[optional] Disables Windows Search while the app is being converted. 如果設定為 false,則會覆寫 ApplyAllPrepareComputerFixes。If set to false, overrides ApplyAllPrepareComputerFixes.
PrepareComputer:: DisableSmsHostServicePrepareComputer:: DisableSmsHostService [選用] 轉換應用程式時停用 SMS Host。[optional] Disables SMS Host while the app is being converted. 如果設定為 false,則會覆寫 ApplyAllPrepareComputerFixes。If set to false, overrides ApplyAllPrepareComputerFixes.
PrepareComputer:: DisableWindowsUpdateServicePrepareComputer:: DisableWindowsUpdateService [選用] 轉換應用程式時停用 Windows Update。[optional] Disables Windows Update while the app is being converted. 如果設定為 false,則會覆寫 ApplyAllPrepareComputerFixes。If set to false, overrides ApplyAllPrepareComputerFixes.
SaveLocationSaveLocation [選用] 用來指定工具儲存位置的元素。[optional] An element to specify the save location of the tool. 如果未指定,套件將會儲存在 [桌面] 資料夾底下。If not specified, the package will be saved under the Desktop folder.
SaveLocation::PackagePathSaveLocation::PackagePath [選用] 儲存所產生 MSIX 套件的檔案或資料夾路徑。[optional] The path to the file or folder where the resulting MSIX package is saved.
SaveLocation::TemplatePathSaveLocation::TemplatePath 選擇性儲存產生的命令列範本之檔案或資料夾的路徑。[optional] The path to the file or folder where the resulting command line template is saved.
Installer::PathInstaller::Path 應用程式安裝程式的路徑。The path to the application installer.
Installer::ArgumentsInstaller::Arguments [選用] 要傳遞給安裝程式的引數。[optional] The arguments to pass to the installer. 工具會使用下列引數,以無訊息模式自動執行 MSI 安裝程式:"/qn /norestart INSTALLSTARTMENUSHORTCUTS=1 DISABLEADVTSHORTCUTS=1"。The tool will automatically run MSI installers silently using argument "/qn /norestart INSTALLSTARTMENUSHORTCUTS=1 DISABLEADVTSHORTCUTS=1". 注意:如果您使用 .exe 安裝程式,則必須傳遞引數來強制您的安裝程式以無訊息模式執行。NOTE: You must pass the arguments to force your installer to run silently if you are using .exe installers.
Installer::InstallLocationInstaller::InstallLocation 選擇性如果已安裝的檔案已安裝(例如 "C:\Program Files (x86) \MyAppInstalllocation"),則為應用程式根資料夾的完整路徑。[optional] The full path to your application's root folder for the installed files if it were installed (e.g. "C:\Program Files (x86)\MyAppInstalllocation").
VirtualMachineVirtualMachine [選用] 用來指定要在本機虛擬機器上執行轉換的元素。[optional] An element to specify that the conversion will be run on a local Virtual Machine.
VirtualMachine:: NameVirtualMachine::Name 要用於轉換環境的虛擬機器名稱。The name of the virtual machine to be used for the conversion environment.
VirtualMachine::UsernameVirtualMachine::Username 要用於轉換環境之虛擬機器的使用者名稱。The user name for the virtual machine to be used for the conversion environment.
RemoteMachineRemoteMachine 選擇性元素,指定要在遠端電腦上執行轉換。[optional] An element to specify that the conversion will be run on a remote machine. 需要第2個範本架構。Requires v2 of the template schema.
RemoteMachine:: ComputerNameRemoteMachine:: ComputerName 要用於轉換環境的遠端電腦名稱稱。The name of the remote machine to be used for the conversion environment. 需要第2個範本架構。Requires v2 of the template schema.
RemoteMachine:: UsernameRemoteMachine:: Username 用於轉換環境之遠端電腦的使用者名稱。The user name for the remote machine to be used for the conversion environment. 需要第2個範本架構。Requires v2 of the template schema.
RemoteMachine:: EnableAutoLogonRemoteMachine:: EnableAutoLogon 選擇性這會在您執行需要重新開機遠端電腦的轉換時,自動將您登入,讓您的轉換可以順暢地繼續。[optional] This will auto log you back in when performing a conversion that requires a restart on a remote machine so your conversion continues seamlessly. 需要範本架構的 V3。Requires V3 of the template schema.
PackageInformation::PackageNamePackageInformation::PackageName MSIX 套件的套件名稱。The Package Name for your MSIX package.
PackageInformation::PackageDisplayNamePackageInformation::PackageDisplayName MSIX 套件的套件顯示名稱。The Package Display Name for your MSIX package.
PackageInformation::PublisherNamePackageInformation::PublisherName MSIX 套件的發行者。The Publisher for your MSIX package.
PackageInformation::PublisherDisplayNamePackageInformation::PublisherDisplayName MSIX 套件的發行者顯示名稱。The Publisher Display Name for your MSIX package.
PackageInformation::VersionPackageInformation::Version MSIX 套件的版本號碼。The version number for your MSIX package.
PackageInformation::P ackageDescriptionPackageInformation::PackageDescription 選擇性MSIX 套件的描述。[optional] The description for your MSIX package. 需要範本架構的 v4。Requires v4 of the template schema.
PackageInformation:: MainPackageNameForModificationPackagePackageInformation:: MainPackageNameForModificationPackage [選用] 主套件名稱的套件識別名稱。[optional] The Package identity name of the main package name. 如果建立的修改套件與主 (父系) 應用程式有相依性,則會用到此項目。This is used when creating a modification package that takes a dependency on a main (parent) application.
SigningInformationSigningInformation 選擇性元素,用來指定 Device Guard 簽署的簽署資訊。[optional] An element to specify signing information for Device Guard signing. 需要範本架構的 v4。Requires v4 of the template schema.
SigningInformation:: DeviceGuardSigningSigningInformation:: DeviceGuardSigning 選擇性用來指定 Device Guard 簽署資訊的元素。[optional] An element to specify Device Guard signing information. 需要範本架構的 v4。Requires v4 of the template schema.
DeviceGuardSigning:: TokenFileDeviceGuardSigning:: TokenFile 以 JSON 格式簽署 Device Guard所需的 Azure AD 存取權杖The Azure AD access token required for Device Guard signing in JSON format. 需要 v4 範本架構。Requires v4 template schema.
DeviceGuardSigning:: TimestampUrlDeviceGuardSigning:: TimestampUrl 選擇性提供使用 Device Guard 簽署時的時間戳記,以確保您的應用程式將會在憑證存留期以外的時間安裝。[optional] Provides a timestamp at the time of signing with Device Guard to ensure that your application will install beyond the lifetime of the certificate. 需要範本架構的 v4。Requires v4 of the template schema.
應用程式Applications [選用] 用來在 MSIX 套件中設定應用程式項目的 0 個或多個應用程式元素。[optional] 0 or more Application elements to configure the Application entries in your MSIX package.
Application::IdApplication::Id MSIX 應用程式的應用程式識別碼。The App ID for your MSIX application. 此識別碼將用於已偵測到且符合指定 ExecutableName 的應用程式項目。This ID will be used for the Application entry detected that matches the specified ExecutableName. 套件中可以有多個可執行檔的應用程式識別碼值。You can have multiple Application ID values for executables in the package.

此值會是套件中應用程式的唯一識別碼。This value is the unique identifier of the application within the package. 此值有時稱為「套件相關應用程式識別碼 (PRAID)」。This value is sometimes referred to as the package-relative app identifier (PRAID). 套件內的識別碼不得重複 (相同識別碼只能在相同套件中使用一次)。The ID must be unique within the package (the same ID cannot be used more than once in the same package). 不過,識別碼一定不是全域唯一。However, the ID must not be unique globally. 系統上可能有另一個套件使用相同的識別碼。There may be another package on the system that uses the same ID.

此字串包含以英文句點分隔的英數欄位。This string contains alpha-numeric fields separated by periods. 每個欄位的開頭必須為 ASCII 字母字元。Each field must begin with an ASCII alphabetic character. 您不能將這些當做域值使用: "CON"、"PRN"、"AUX"、"NUL"、"COM1"、"COM2"、"COM3"、"COM4"、"COM5"、"COM6"、"COM7"、"COM8"、"COM9"、"LPT1"、"LPT2"、"LPT3"、"LPT4"、"LPT5"、"LPT6"、"LPT7"、"LPT8" 和 "LPT9"。You cannot use these as field values: "CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", and "LPT9".
Application::DisplayNameApplication::DisplayName MSIX 套件的應用程式顯示名稱。The App Display Name for your MSIX package. 此顯示名稱將用於已偵測到且符合指定 ExecutableName 的應用程式項目This Display Name will be used for the application entry detected that matches the specified ExecutableName
Application::ExecutableNameApplication::ExecutableName MSIX 應用程式的可執行檔名稱,這將會新增至套件資訊清單中。The executable name for the MSIX application that will be added to the package manifest. 如果偵測不到具有此名稱的任何應用程式,將會忽略對應的應用程式項目。The corresponding application entry will be ignored if no application with this name is detected.
Application::DescriptionApplication::Description [選用] MSIX 應用程式的應用程式描述。[optional] The App Description for your MSIX application. 如果未使用,則會使用應用程式的 DisplayName。If not used, the Application DisplayName will be used. 此描述將用於已偵測到且符合指定 ExecutableName 的應用程式項目This description will be used for the application entry detected that matches the specified ExecutableName
功能Capabilities [選用] 用來將自訂功能新增至 MSIX 套件的 0 個或多個功能元素。[optional] 0 or more Capability elements to add custom capabilities to your MSIX package. “runFullTrust” 是轉換期間預設新增的功能。“runFullTrust” capability is added by default during conversion.
Capability::NameCapability::Name 新增至 MSIX 套件的功能。The capability to add to your MSIX package.

範例轉換範本檔案Sample conversion template file

<MsixPackagingToolTemplate
    xmlns="http://schemas.microsoft.com/appx/msixpackagingtool/template/2018"
    xmlns:V2="http://schemas.microsoft.com/msix/msixpackagingtool/template/1904"
    xmlns:V3="http://schemas.microsoft.com/msix/msixpackagingtool/template/1907"
    xmlns:V4="http://schemas.microsoft.com/msix/msixpackagingtool/template/1910"
    xmlns:V5="http://schemas.microsoft.com/msix/msixpackagingtool/template/2001">
<!--Note: You only need to include xmlns:v2 - xmlns:v5 if you are using one of the features that use those schemas -->

    <Settings
        AllowTelemetry="true"
        ApplyAllPrepareComputerFixes="true"
        GenerateCommandLineFile="true"
        AllowPromptForPassword="false" 
        EnforceMicrosoftStoreVersioningRequirements="false"
        v2:ServerPortNumber="1599"
        v5:AddPackageIntegrity="true">    

    <!--Note: Exclusion items are optional and if declared take precedence over the default tool exclusion items
        <ExclusionItems>
            <FileExclusion ExcludePath="[{CryptoKeys}]" />
            <FileExclusion ExcludePath="[{Common AppData}]\Microsoft\Crypto" />
            <FileExclusion ExcludePath="[{Common AppData}]\Microsoft\Search\Data" />
            <FileExclusion ExcludePath="[{Cookies}]" />
            <FileExclusion ExcludePath="[{History}]" />
            <FileExclusion ExcludePath="[{Cache}]" />
            <FileExclusion ExcludePath="[{Personal}]" />
            <FileExclusion ExcludePath="[{Profile}]\Local Settings" />
            <FileExclusion ExcludePath="[{Profile}]\NTUSER.DAT.LOG1" />
            <FileExclusion ExcludePath="[{Profile}]\ NTUSER.DAT.LOG2" />
            <FileExclusion ExcludePath="[{Recent}]" />
            <FileExclusion ExcludePath="[{Windows}]\debug" />
            <FileExclusion ExcludePath="[{Windows}]\Logs\CBS" />
            <FileExclusion ExcludePath="[{Windows}]\Temp" />
            <FileExclusion ExcludePath="[{Windows}]\WinSxS\ManifestCache" />
            <FileExclusion ExcludePath="[{Windows}]\WindowsUpdate.log" />
        <FileExclusion ExcludePath="[{Windows}]\Installer" />
            <FileExclusion ExcludePath="[{AppVPackageDrive}]\$Recycle.Bin " />
            <FileExclusion ExcludePath="[{AppVPackageDrive}]\System Volume Information" />
        <FileExclusion ExcludePath="[{AppVPackageDrive}]\Config.Msi" />
            <FileExclusion ExcludePath="[{AppData}]\Microsoft\AppV" />
            <FileExclusion ExcludePath="[{Common AppData}]\Microsoft\Microsoft Security Client" />
            <FileExclusion ExcludePath="[{Common AppData}]\Microsoft\Microsoft Antimalware" />
            <FileExclusion ExcludePath="[{Common AppData}]\Microsoft\Windows Defender" />
            <FileExclusion ExcludePath="[{ProgramFiles}]\Microsoft Security Client" />
            <FileExclusion ExcludePath="[{ProgramFiles}]\Windows Defender" />
        <FileExclusion ExcludePath="[{ProgramFiles}]\WindowsApps" />
            <FileExclusion ExcludePath="[{Local AppData}]\Temp" />
        <FileExclusion ExcludePath="[{Local AppData}]\Microsoft\Windows" />
        <FileExclusion ExcludePath="[{Local AppData}]\Packages" />

            <RegistryExclusion ExcludePath= "REGISTRY\MACHINE\SOFTWARE\Wow6432Node\Microsoft\Cryptography" />
            <RegistryExclusion ExcludePath= "REGISTRY\MACHINE\SOFTWARE\Microsoft\Cryptography" />
            <RegistryExclusion ExcludePath= "REGISTRY\MACHINE\SOFTWARE\Microsoft\Microsoft Antimalware" />
            <RegistryExclusion ExcludePath= "REGISTRY\MACHINE\SOFTWARE\Microsoft\Microsoft Antimalware Setup" />
            <RegistryExclusion ExcludePath= "REGISTRY\MACHINE\SOFTWARE\Microsoft\Microsoft Security Client" />
            <RegistryExclusion ExcludePath= "REGISTRY\MACHINE\SOFTWARE\Policies\Microsoft\Microsoft Antimalware" />
            <RegistryExclusion ExcludePath= "REGISTRY\MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender" />
            <RegistryExclusion ExcludePath= "REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU" />
            <RegistryExclusion ExcludePath= "REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU" />
            <RegistryExclusion ExcludePath= "REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams" />
            <RegistryExclusion ExcludePath= "REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\Streams" />
            <RegistryExclusion ExcludePath= "REGISTRY\MACHINE\SOFTWARE\Microsoft\AppV" />
            <RegistryExclusion ExcludePath= "REGISTRY\MACHINE\SOFTWARE\Wow6432Node\Microsoft\AppV" />
            <RegistryExclusion ExcludePath= "REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Microsoft\AppV" />
            <RegistryExclusion ExcludePath= "REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Wow6432Node\Microsoft\AppV" />
        </ExclusionItems>
    -->
    
    <!--Note: Specifying an installer exit code will allow you to automatically trigger a reboot during your conversion
      <v2:ValidInstallerExitCodes>
        <V2:ValidInstallerExitCode ExitCode="3010" V3:Reboot="true"/>
        <V2:ValidInstallerExitCode ExitCode="1641"/>
      </v2:ValidInstallerExitCodes>
    -->
        
    </Settings>

    <!--Note: this section takes precedence over the Settings::ApplyAllPrepareComputerFixes attribute and is optional
    <PrepareComputer
        DisableDefragService="true"
        DisableWindowsSearchService="true"
        DisableSmsHostService="true"
        DisableWindowsUpdateService="true"/>
    -->

    <SaveLocation
        PackagePath="C:\users\user\Desktop\MyPackage.msix" 
        TemplatePath="C:\users\user\Desktop\MyTemplate.xml" />

    <Installer
        Path="C:\MyAppInstaller.msi"
        InstallLocation="C:\Program Files\MyAppInstallLocation" />
    
    <!--NOTE: This section specifies that the conversion will be run on a local Virtual Machine. This is optional if you want to change your conversion environment from the default local machine.
    <VirtualMachine Name="vmname" Username="vmusername"/>
    -->

    <!--NOTE: This section specifies that the conversion will be run on a remote machine.This is optional if you want to change your conversion environment from the default local machine.
    <v2:RemoteMachine ComputerName="vmname" Username="vmusername" v3:EnableAutoLogon="true"/>
    -->

    <PackageInformation
        PackageName="MyAppPackageName"
        PackageDisplayName="MyApp Display Name"
        PublisherName="CN=MyPublisher"
        PublisherDisplayName="MyPublisher Display Name"
        Version="1.1.0.0"
        MainPackageNameForModificationPackage="MainPackageIdentityName">

    <!--Note: This is optional, if you want to sign your package with Device Guard signing
        <v4:SigningInformation>
            <v4:DeviceGuardSigning
                Tokenfile="tokenfile.json"
                TimestampUrl="https://mytimestamp.com"/>
        </v4:SigningInformation>
    -->
        
    <!--NOTE: This ID will be used if the Application entry detected matches the specified ExecutableName
        <Applications>
            <Application
                Id="MyApp1"
                Description="MyApp"
                DisplayName="My App"
                ExecutableName="MyApp.exe"/>
        </Applications>
    -->

    <!--NOTE: This is optional as “runFullTrust” capability is added by default during conversion
        <Capabilities>
            <Capability Name="runFullTrust" />
        </Capabilities>
    -->
        
    </PackageInformation>
</MsixPackagingToolTemplate>