## Purpose :
- Fix#19
## Details :
- Removing duplicate of the value `OemPreInstalledAppsEnabled`.
- Removing duplicate of the value `PreInstalledAppsEnabled`.
- Removing duplicate of the value `SilentInstalledAppsEnabled`.
- Removing duplicate of the value `SubscribedContentEnabled`.
- Removing duplicate of the value `ContentDeliveryAllowed`.
## Purpose :
- Fix#17
- Fix#18
> This will avoid collision and let user retrive easely the log file.
## Details :
- Using subexpression `$(get-date -f yyyyMMdd_HHmms)` inside the log file name.
- Changing path of the log to `$PSScriptRoot` . (so iso, log, script will be at the same place.)
Features
Added removal of Copilot, the new Outlook client, and Microsoft Teams packages.
Added registry keys to proactively disable Copilot and prevent app re-installations.
Improvements
Switched to Dism.exe with /Compress:recovery for significantly smaller final ISO file sizes.
Reworked scheduled task removal to be simpler and more reliable.
- Fix `PSAvoidTrailingWhitespace`
- Fix `PSAvoidUsingWriteHost`
- Fix `PSAvoidUsingEmptyCatchBlock`
- Fix `PSUseShouldProcessForStateChangingFunctions`
> False positive, it does not touch the running system registry.
For `PSAvoidUsingPositionalParameters` i can add named parameters but it's not mandatory if positional is repected.
- Add new packages in `$packagePrefixes`.
- Change disposiition of `$packagePrefixes` to better lisibility.
- Modify the `where-object` query param from `-like "$_*"` to `-like "*$_*"`
Updated `tiny11maker.ps1` to replace `Remove-RegistryKey`
with `Remove-RegistryValue` for specific registry values.
Expanded the cleanup section to include detailed checks
and messages for the existence and removal of temporary
files and directories, improving script robustness and
user feedback.
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.
*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.
- Changed main form, buttons, and textboxes to dark theme with white text
- Removed title label from the form
- Updated placeholder text for ISO selection textbox
- Relocated various UI elements for better layout
- Added log messages to guide user through mounting process
- Improved user prompts and completion messages
- Introduced `Remove-RegistryValue` and `Set-RegistryValue` functions to replace direct `reg` commands for registry modifications.
- Moved and redefined `Add-Log` function to enhance logging capabilities.
- Added `Mount-Image` function and updated `MountButton.Add_Click` event handler to use it.
- Enhanced logging for better user feedback.
- Updated final cleanup message for improved user-friendliness.
- Change `$ImageIndexLabel` text from "SKU:" to "SKU index:".
- Update `Copy-Item` command to include:
* Save image info using `dism`.
* Add image index to combobox from `Get-WindowsImage`.
* Update message box text to refer to logs for edition info.
* Log `$SKUInfo` variable.
User can now look in logs to see index edition.
- Added DllImport for `ShowWindow` to hide PowerShell window.
- Adjusted UI element sizes and positions for better layout.
- Disabled buttons and combo boxes after actions, added corresponding logs.
- Added message box prompt for SKU image selection.
- Added logging and dismounting of images after process completion.
- Included various logging messages to track script progress.
- Add .iso files to .gitignore
- Modify $MountButton event handler to remove enabling of $ImageIndexLabel and $ImageIndexComboBox
- Remove placeholder items from $ImageIndexComboBox initialization
- Update $StartButton event handler:
- Remove SKU log entry
- Remove setting $ImageIndexComboBox.Items to Get-WindowsImage result
- Add Get-WindowsImage command to show image info
- Add image index to $ImageIndexComboBox based on Get-WindowsImage result
- Enable $ImageIndexLabel and $ImageIndexComboBox
- Add log messages to prompt user to select image index
- Add event handler for $ImageIndexComboBox.SelectedIndexChanged to set $index and log mounting process
- Update final steps of script:
- Remove completion log message and message box display
- End script with closing event handler and add new label for logs
A new file that add GUI to the logic of 'tiny11maker.ps1'.
Not totally functionnal right now, need to improve some things...
- Add .vs directory to .gitignore for Visual Studio
A new section has been added to the .gitignore file, indicating that it was automatically created by Microsoft Visual Studio. The .vs directory, which is used by Visual Studio to store temporary files and settings, has been added to the ignore list to prevent these files from being tracked by Git.
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.