|
我想要将windows 7安全启动的相关启动文件更新到win7 iso启动文件以及boot.wim中,以达到在安全启动启用的前提下进入Windows Setup。咋办呢?
ISO里边的启动文件我可以拷贝win 8.1的。但是sources\boot.wim的镜像我拷贝了相关的文件还是不行。
- Mount-WindowsImage -ImagePath .\install.wim -Path C:\Offline\ -Index 1
- Mount-WindowsImage -ImagePath .\boot.wim -Path C:\OfflineRe\ -Index 1
- $permfile = [IO.Path]::GetTempFileName()
- icacls C:\OfflineRe\Windows\System32\winload.efi /save "$permfile"
- copy C:\Offline\Windows\System32\winload.efi C:\OfflineRe\Windows\System32\
- icacls C:\OfflineRe\Windows\System32\ /restore "$permfile"
- Remove-Item "$permfile"
- $permfile = [IO.Path]::GetTempFileName()
- icacls C:\OfflineRe\Windows\System32\winresume.efi /save "$permfile"
- copy C:\Offline\Windows\System32\winresume.efi C:\OfflineRe\Windows\System32\
- icacls C:\OfflineRe\Windows\System32\ /restore "$permfile"
- Remove-Item "$permfile"
- Dismount-WindowsImage -Path C:\OfflineRe\ -Save
- Mount-WindowsImage -ImagePath .\boot.wim -Path C:\OfflineRe\ -Index 2
- #重复上述过程
复制代码
虚拟机加载boot.wim后就死掉了。
|
|