rem 将install.wim文件路径赋值给变量,这里假设install.wim就在A文件夹下
set "installWimPath=A\install.wim"
rem 挂载点路径,假设在B文件夹下
set "mountPath=B"
rem 一些Appx文件所在文件夹路径,假设在C文件夹下
set "filesFolderPath=C"
rem 首先挂载install.wim文件到指定挂载点
dism /Mount-Image /ImageFile:"%installWimPath%" /Index:1 /MountDir:"%mountPath%"
rem 循环添加Appx包
for /f %%a IN ('"dir /b %filesFolderPath%\*.Appx" 2^>nul') do (
dism /Image:"%mountPath%" /Add-ProvisionedAppxPackage /PackagePath:"%%a" /SkipLicense
)
set "installWimPath=A\install.wim"
rem 挂载点路径,假设在B文件夹下
set "mountPath=B"
rem 一些Appx文件所在文件夹路径,假设在C文件夹下
set "filesFolderPath=C"
rem 首先挂载install.wim文件到指定挂载点
dism /Mount-Image /ImageFile:"%installWimPath%" /Index:1 /MountDir:"%mountPath%"
rem 循环添加Appx包
for /f %%a IN ('"dir /b %filesFolderPath%\*.Appx" 2^>nul') do (
dism /Image:"%mountPath%" /Add-ProvisionedAppxPackage /PackagePath:"%%a" /SkipLicense
)
文章来源:
网络小编D
版权声明:
本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,请联系本站立刻删除。
