mirror of
https://github.com/ntdevlabs/tiny11builder.git
synced 2025-09-16 14:18:01 +02:00
Add autounattend.xml download if missing
Implement a check for the existence of `autounattend.xml`. If the file is not found, download it from a specified URL using `Invoke-RestMethod` and save it to the script's root directory. This ensures the configuration file is available for the script's execution.
This commit is contained in:
@@ -99,7 +99,9 @@ if (! $myWindowsPrincipal.IsInRole($adminRole))
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
if (-not (Test-Path -Path "$PSScriptRoot/autounattend.xml")) {
|
||||
Invoke-RestMethod "https://raw.githubusercontent.com/ntdevlabs/tiny11builder/refs/heads/main/autounattend.xml" -OutFile "$PSScriptRoot/autounattend.xml"
|
||||
}
|
||||
|
||||
# Start the transcript and prepare the window
|
||||
Start-Transcript -Path "$ScratchDisk\tiny11.log"
|
||||
|
Reference in New Issue
Block a user