File tree 3 files changed +24
-0
lines changed
3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1210
1210
<None Include =" Helpers\extps1\PE_Helper\files\DISMTools-PE.zip" >
1211
1211
<CopyToOutputDirectory >Always</CopyToOutputDirectory >
1212
1212
</None >
1213
+ <None Include =" Helpers\extps1\PE_Helper\files\HotInstall.zip" >
1214
+ <CopyToOutputDirectory >Always</CopyToOutputDirectory >
1215
+ </None >
1213
1216
<None Include =" Helpers\extps1\PE_Helper\files\startup\StartInstall.ps1" >
1214
1217
<CopyToOutputDirectory >Always</CopyToOutputDirectory >
1215
1218
</None >
Original file line number Diff line number Diff line change @@ -205,6 +205,19 @@ function Start-PEGeneration
205
205
{
206
206
Write-Host " Temporary files haven't been deleted successfully"
207
207
}
208
+ # Detect if HotInstall is present in the working directory and copy it to the ISO file
209
+ if (Test-Path - Path " $ ( (Get-Location ).Path) \files\HotInstall.zip" - PathType Leaf) {
210
+ Write-Host " HotInstall has been detected. Adding to ISO file to allow installations from full Windows environments..."
211
+ Expand-Archive - Path " $ ( (Get-Location ).Path) \files\HotInstall.zip" - Destination " $ ( (Get-Location ).Path) \ISOTEMP\media" - Force - ErrorAction SilentlyContinue
212
+ if ($? )
213
+ {
214
+ Write-Host " HotInstall has been copied successfully."
215
+ }
216
+ else
217
+ {
218
+ Write-Host " HotInstall could not be copied."
219
+ }
220
+ }
208
221
Write-Host " The ISO file structure has been successfully created. DISMTools will continue creating the ISO file automatically after 5 seconds."
209
222
Start-Sleep - Seconds 5
210
223
Write-Host " Creating ISO file..."
@@ -1447,6 +1460,14 @@ function New-BootFiles
1447
1460
diskpart / s " X:\files\diskpart\dp_bootassign.dp" | Out-Host
1448
1461
}
1449
1462
}
1463
+
1464
+ if (Test-Path - Path " X:\HotInstall\BcdEntry" - PathType Leaf) {
1465
+ Write-Host " Deleting BCD entry..."
1466
+ $entryGuid = Get-Content - Path " X:\HotInstall\BcdEntry"
1467
+ if ($entryGuid -ne " " ) {
1468
+ bcdedit / delete $entryGuid | Out-Host
1469
+ }
1470
+ }
1450
1471
}
1451
1472
bcdboot " $ ( $drLetter ) :\Windows" / s " W:" / f ALL
1452
1473
}
You can’t perform that action at this time.
0 commit comments