*merge from my old different pr.
## New parameter and improvement
- Updated script parameters to include a new $p_IsoDisk parameter.
- Renamed $ScratchDisk to $p_ScratchDisk throughout the script.
- Added logic to handle $p_IsoDisk, prompting user if not provided.
- Removed output of scratch disk setting.
- Change the ordre to match iso then scratch
- Rename parameter
- Adding pattern for second one too
- Adding synopsis with some informations on the script and calling exemples.
## New Functions for optimisation
- Introduced Remove-RegistryValue and Set-RegistryValue functions to replace direct reg commands for registry modifications.
## Auto Dismount
- Dismounting the iso image after process completion.
## SKU validation
- Added validation to ensure the entered index is valid by checking against available indices in the Windows image file.
- Introduced a loop to repeatedly prompt the user until a valid index is provided.
## Others
- Updated `.gitignore` to exclude Visual Studio files.
- Revised `README.md` for clarity and added new features.
last corrections
- to replace wrong command -ScratchDirectory with -Path
- putting param to the top
- make sure $Scratchdisk is $PSScriptRoot remove :\ or trailing \
- param will now have error handling for drive letters c-z and C-Z
- all references to $env:systemdrive or $($env:systemdrive) now generalized to $ScratchDisk
- tested the modified script and review log for errors
The idea of the release of this project is using PowerShell instead of commandline in the previous version, which is a great move and make it easier to maintain and read.
For sake of easier syntax and readability I have attempted using PowerShell commandlets for dism.
There are few remaining areas that need to be reworked (invoking dism.exe) to become fully consistent.
This new release of tiny11 builder enables the ability to use images that has ESD files instead of the standard WIM. It also suppresses some of the output, making it a bit easier to track what is going on.
It also cleans up the last remains of Edge! Last, but not least, it fixes an issue with logging.