Skip to content
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

Adding SKU validation #338

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Conversation

Miiraak
Copy link

@Miiraak Miiraak commented Feb 19, 2025

Purpose :

Details :

  • 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.

File changes on : 0241e51

Miiraak and others added 17 commits November 20, 2024 12:19
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.
- 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
- 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.
…mage

UI adjustments, logging, window hiding and dismounting image
- 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.
Enhance logging for image processing
- 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.
Added :
- Disable image index combobox after selection
- Move process completion message box to script end

Removed:
- Some comments removed
- 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
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Script completed with no bootable ISO.
1 participant