Skip to content

Update Invoke-Provision.ps1 #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Invoke-Provision/Invoke-Provision.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -511,14 +511,14 @@ try {
Write-Host "`nSetting the boot environment.." -ForegroundColor Yellow
Invoke-Cmdline -application "$($usb.scRoot)Windows\System32\bcdboot" -argumentList "$($usb.scRoot)Windows /s s: /f all"
#endregion
#region Copying over unattended.xml
Write-Host "`nLooking for unattented.xml.." -ForegroundColor Yellow
if (Test-Path "$($usb.winPESource)scripts\unattended.xml" -ErrorAction SilentlyContinue) {
#region Copying over unattend.xml
Write-Host "`nLooking for unattend.xml.." -ForegroundColor Yellow
if (Test-Path "$($usb.winPESource)scripts\unattend.xml" -ErrorAction SilentlyContinue) {
Write-Host "Found it! Copying over to scratch drive.." -ForegroundColor Green
if(-not (Test-Path "$($usb.scRoot)Windows\Panther" -ErrorAction SilentlyContinue)){
New-Item -Path "$($usb.scRoot)Windows\Panther" -ItemType Directory -Force | Out-Null
}
Copy-Item -Path "$($usb.winPESource)\scripts\unattended.xml" -Destination "$($usb.scRoot)Windows\Panther\unattended.xml" | Out-Null
Copy-Item -Path "$($usb.winPESource)\scripts\unattend.xml" -Destination "$($usb.scRoot)Windows\Panther\unattend.xml" | Out-Null
}
else {
Write-Host "Nothing found. Moving on.." -ForegroundColor Red
Expand Down