Skip to content

Enhance logging for image processing #8

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

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions tiny11makerGUI.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ $DriveComboBox.Enabled = $false

# SKU Index Label
$ImageIndexLabel = New-Object System.Windows.Forms.Label
$ImageIndexLabel.Text = "SKU:"
$ImageIndexLabel.Text = "SKU index:"
$ImageIndexLabel.Font = New-Object System.Drawing.Font('Consolas', 10)
$ImageIndexLabel.Location = New-Object System.Drawing.Point(150, 110)
$ImageIndexLabel.AutoSize = $true
Expand Down Expand Up @@ -210,15 +210,16 @@ Remove-Item "$ScratchDisk\tiny11\sources\install.esd" > $null 2>&1
Add-Log "Copy complete!"
Start-Sleep -Seconds 2
Add-Log "Getting image information:"
# Showing information about the image, then prompting the user to select the index
Get-WindowsImage -ImagePath $ScratchDisk\tiny11\sources\install.wim
# save information about the image
$SKUInfo = & dism /English /Get-WimInfo "/wimFile:$($ScratchDisk)\tiny11\sources\install.wim" | Out-String
# add the image index to the combobox based on Get-WindowsImage -ImagePath $ScratchDisk\tiny11\sources\install.wim
$ImageIndexComboBox.Items.AddRange((Get-WindowsImage -ImagePath $ScratchDisk\tiny11\sources\install.wim).ImageIndex)
$ImageIndexLabel.Enabled = $true
$ImageIndexComboBox.Enabled = $true
[System.Windows.Forms.MessageBox]::Show("Please select the image under ""SKU"".", "Image selection", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Information)
[System.Windows.Forms.MessageBox]::Show("Please select the image under ""SKU"" look in logs to find desired edition.", "Image selection", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Information)
Add-Log "Please select the image index in 'SKU'"
Add-Log ' '
Add-Log $SKUInfo
$ImageIndexComboBox.Add_SelectedIndexChanged({
$index = $ImageIndexComboBox.SelectedItem
Add-Log "Mounting Windows image. This may take a while."
Expand Down