@echo off
setlocal EnableDelayedExpansion

SET DependencyPackage=

FOR /R "%~dp0" %%# in (*.appxbundle) DO (
    SET APPXBUNDLE=/PackagePath:"%~dp0%%~nx#"
)

FOR /R "%~dp0" %%# in (*.msixbundle) DO (
    SET APPXBUNDLE=/PackagePath:"%~dp0%%~nx#"
)

FOR /R "%~dp0" %%# in (*.xml) DO (
    SET License1XML=/LicensePath:"%~dp0%%~nx#"
)

FOR /R "%~dp0" %%# in (*_x64__8wekyb3d8bbwe*) DO (
    SET DependencyPackage=!DependencyPackage! /DependencyPackagePath:"%~dp0%%~nx#"
)

dism /online /Add-ProvisionedAppxPackage %APPXBUNDLE% %License1XML%%DependencyPackage%

PAUSE