Skip to content

Commit

Permalink
DISMTools 0.6 Preview 1 (#163)
Browse files Browse the repository at this point in the history
* [PE Helper] Add a way to go back to disk selection

* DISMTools Nightly Installer

* [Issue Template] Update bug template

* [Unattended answer file] Make form sizable

* DISMTools Nightly Installer

* [UnattendGen] Update shipped copy and self-contained tag

* DISMTools Nightly Installer

* [Info Saver] Convert reports from plain text to Markdown (Preview 1) (#162)

* [Info Saver] Massive revamp using Markdown

* DISMTools Nightly Installer

* [Info Saver] Add missing newlines

* DISMTools Nightly Installer

---------

Co-authored-by: CodingWonders <[email protected]>

* DISMTools Nightly Installer

* [PE Helper] Make progress output cleaner

* DISMTools Nightly Installer

* [Issue Template] Update templates

* [Exceptions] Update Exception Reporting Link

* DISMTools Nightly Installer

* [REL] Update What's New section and new Update Info files

* DISMTools Nightly Installer

---------

Co-authored-by: CodingWonders <[email protected]>
  • Loading branch information
CodingWonders and CodingWonders authored Aug 31, 2024
1 parent edfdd7e commit dc8bcf0
Show file tree
Hide file tree
Showing 22 changed files with 676 additions and 642 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Please describe the bug you're experiencing. Examples:

- *When doing something, the program crashes*

**IF YOU HAVE ENCOUNTERED A PROGRAM EXCEPTION, YOU NEED TO USE ITS RESPECTIVE TEMPLATE. Go to the issue types and select "Program exception"**

**How does it happen?**
Please provide the steps necessary to reproduce this bug:

Expand All @@ -26,6 +28,4 @@ If applicable, add screenshots to help explain your problem.


**Additional context**
Add any other context about the problem here.

**NOTE:** in the case of a program exception, you need to paste the error information in the first section. Remove example information beforehand.
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/program-exception.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Program exception
about: Noticed an internal error? Please tell us more!
title: 'Program exception'
labels: bug, good first issue
assignees: CodingWonders

---

If you have run into an internal error (program exception), we would like to learn more about it. When an error occurs, its information will be copied to your clipboard. If you can't find error information on your clipboard, a local copy was also saved at `<program directory>\Logs\Errors`.

**PLEASE PROVIDE DETAILS ABOUT THE EXCEPTION, OR YOUR ISSUE WILL BE CLOSED WITHIN 4 HOURS**

**Exception information**: please tell us what happened below:

<!-- Exception Information. If you have the local copy on hand, please attach it -->

**How did it happen?** What steps did you perform in order to experience this problem?

<!-- Steps -->
4 changes: 2 additions & 2 deletions Elements/AutoUnattend/ImageLanguage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<ImageLanguage Id="ar-SA" DisplayName="Arabic"/>
<ImageLanguage Id="pt-BR" DisplayName="Brazilian Portuguese"/>
<ImageLanguage Id="bg-BG" DisplayName="Bulgarian"/>
<ImageLanguage Id="zh-Hans-CN" DisplayName="Chinese Simplified"/>
<ImageLanguage Id="zh-Hant-CN" DisplayName="Chinese Traditional"/>
<ImageLanguage Id="zh-CN" DisplayName="Chinese Simplified"/>
<ImageLanguage Id="zh-TW" DisplayName="Chinese Traditional"/>
<ImageLanguage Id="hr-HR" DisplayName="Croatian"/>
<ImageLanguage Id="cs-CZ" DisplayName="Czech"/>
<ImageLanguage Id="da-DK" DisplayName="Danish"/>
Expand Down
43 changes: 39 additions & 4 deletions Helpers/extps1/PE_Helper/PE_Helper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,19 @@ function Start-OSApplication
}
Write-Host "Selected disk: disk $($drive)"
$partition = Get-Partitions $drive
if ($partition -eq "B")
{
do {
$drive = Get-Disks
if ($drive -eq "ERROR")
{
Write-Host "Script has failed."
return
}
Write-Host "Selected disk: disk $($drive)"
$partition = Get-Partitions $drive
} until ($partition -ne "B")
}
if ($partition -eq 0)
{
$msg = "This will perform disk configuration changes on disk $drive. THIS WILL DELETE ALL PARTITIONS IN IT. IF YOU ARE NOT WILLING TO LOSE DATA, DO NOT CONTINUE."
Expand All @@ -669,6 +682,19 @@ function Start-OSApplication
do
{
$partition = Get-Partitions $drive
if ($partition -eq "B")
{
do {
$drive = Get-Disks
if ($drive -eq "ERROR")
{
Write-Host "Script has failed."
return
}
Write-Host "Selected disk: disk $($drive)"
$partition = Get-Partitions $drive
} until ($partition -ne "B")
}
if ($partition -eq 0)
{
$msg = "This will perform disk configuration changes on disk $drive. THIS WILL DELETE ALL PARTITIONS IN IT. IF YOU ARE NOT WILLING TO LOSE DATA, DO NOT CONTINUE.`n"
Expand Down Expand Up @@ -708,6 +734,7 @@ function Start-OSApplication
} until ($driveLetter -ne "")
}
}
Write-Host "Creating page file for Windows PE..."
wpeutil createpagefile /path="$($driveLetter):\WinPEpge.sys" /size=256
$wimFile = Get-WimIndexes
$serviceableArchitecture = (((Get-CimInstance -Class Win32_Processor | Where-Object { $_.DeviceID -eq "CPU0" }).Architecture) -eq (Get-WindowsImage -ImagePath "$($wimFile.wimPath)" -Index $wimFile.index).Architecture)
Expand Down Expand Up @@ -884,11 +911,18 @@ function Get-Partitions
$partLister | Out-File -FilePath "X:\files\diskpart\dp_listpart.dp" -Force -Encoding utf8
$part = -1
diskpart /s "X:\files\diskpart\dp_listpart.dp" | Out-Host
$part = Read-Host -Prompt "Please choose the partition to apply the image to. If the disk contains no partitions, leave it empty"
Write-Host ""
Write-Host "- If the selected disk contains no partitions, press ENTER. Otherwise, type a partition number."
Write-Host "- If you have selected the wrong disk, type `"B`" now and press ENTER`n"
$part = Read-Host -Prompt "Please choose the partition to apply the image to"
if ($part -eq -1)
{
return $part
}
elseif ($part -eq "B")
{
return $part
}
else
{
try
Expand Down Expand Up @@ -983,7 +1017,7 @@ function Write-DiskConfiguration
$formatter = $formatter.Replace("#GPTPART#", "REM Unused Partition Block").Trim()
}
$formatter | Out-File "X:\files\diskpart\dp_format.dp" -Force -Encoding utf8
diskpart /s "X:\files\diskpart\dp_format.dp" | Out-Host
$dpProc = Start-Process -FilePath "$env:SYSTEMROOT\system32\diskpart.exe" -ArgumentList "/s `"X:\files\diskpart\dp_format.dp`"" -Wait -PassThru -NoNewWindow
}
else
{
Expand All @@ -996,7 +1030,7 @@ function Write-DiskConfiguration
$formatter = $formatter.Replace("#DISKID#", $diskId).Trim()
$formatter = $formatter.Replace("#PARTID#", $partId).Trim()
$formatter | Out-File "X:\files\diskpart\dp_format.dp" -Force -Encoding utf8
diskpart /s "X:\files\diskpart\dp_format.dp" | Out-Host
$dpProc = Start-Process -FilePath "$env:SYSTEMROOT\system32\diskpart.exe" -ArgumentList "/s `"X:\files\diskpart\dp_format.dp`"" -Wait -PassThru -NoNewWindow
}
Write-Host "Disk configuration has been written successfully."
}
Expand Down Expand Up @@ -1157,7 +1191,8 @@ function Start-DismCommand
}
}
"Apply" {
dism /apply-image /imagefile="$WimFile" /index=$WimIndex /applydir="$ImagePath" | Out-Host
$dismProc = Start-Process -FilePath "$env:SYSTEMROOT\system32\dism.exe" -ArgumentList "/apply-image /imagefile=`"$WimFile`" /index=$WimIndex /applydir=$ImagePath" -Wait -PassThru -NoNewWindow
return ($($dismProc.ExitCode) -eq 0)
}
"Add-Package" {
Add-WindowsPackage -Path "$ImagePath" -PackagePath "$PackagePath" -NoRestart | Out-Null
Expand Down
Binary file modified Installer/Nightly/dt_setup.exe
Binary file not shown.
32 changes: 16 additions & 16 deletions MainForm.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions MainForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@
<value>399, 95</value>
</metadata>
<metadata name="Timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>727, 95</value>
<value>893, 95</value>
</metadata>
<metadata name="WatcherBW.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>283, 95</value>
Expand All @@ -1167,18 +1167,12 @@
<value>155, 95</value>
</metadata>
<metadata name="ImgSpecialToolsCMS.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>816, 95</value>
<value>727, 95</value>
</metadata>
<metadata name="WIEDownloaderBW.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>982, 95</value>
</metadata>
<metadata name="VideoGetterBW.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="ImgSpecialToolsCMS.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>678, 95</value>
</metadata>
<metadata name="WIEDownloaderBW.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>844, 95</value>
</metadata>
</root>
16 changes: 8 additions & 8 deletions My Project/Resources.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 10 additions & 35 deletions My Project/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -748,44 +748,19 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
<value>..\Resources\get_appxpkg_info.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="WhatsNew" xml:space="preserve">
<value>Changes made since last preview:
<value>Bugfixes:

--- Bugfixes:
- Fixed an issue where some properties for image information reports were not obtained

- Fixed some visual issues in the unattended answer file creation wizard
New features:

--- New features:

- Downloading the self-contained version of the unattended answer file generator program now happens in a separate thread. After downloading, you will also see a notification in your system tray
- 7-Zip has been updated to version 24.08
- A confirmation dialog has been added to the ISO creation dialog that makes sure you have saved your changes to your image

Overall changes:

--- Bugfixes:

- The reliability of AppX background processes has been improved
- The Preinstallation Environment (PE) Helper now checks if there are Windows images present in your ISOs and will exit if none are detected
- Fixed an issue where detecting keyboard layered drivers would fail when managing active installations
- Video tutorial detection has been moved to a separate thread, avoiding UI deadlocks on slow wireless network connections (thanks @vadimlitvinenko87 for spotting)
- Fixed an issue in the capability information dialog where it would show feature state (as opposed to capability state) when searching items

--- New features:

- The Preinstallation Environment (PE) Helper has had several improvements:
- A new tool has been added: the Driver Installation Module (DIM), which assists you in installing device drivers on active Windows PEs. These drivers are then added to the target image
- Now, you can create testing environments in which you can test your applications for Windows PE compatibility and with which you can make further customizations to the Preinstallation Environment if necessary
- Italian translations have been added
- If the Windows ADK is installed, but the "AdkInstallation" registry value is not present, the program can add it automatically
- CODE: MSU package addition has been simplified
- If an operation completes with errors, the program will now show a description of the error, in the system language, from the Windows APIs instead of a generic string
- Stub package options can now be set for AppX packages that are added
- You can now add packages by specifying Microsoft Update Manifest (MUM) files (thanks @AnubyteCode for suggesting this)
- The Scintilla.NET component has been updated to version 5.6.1
- You can now list the contents of any Windows image with the new Windows Image Explorer
- You can now set keyboard layered drivers on your Windows image, which are useful for Japanese and Korean keyboards
- The unattended answer file features have been revamped, using the Unattended Answer File Generator from Christoph Schneegans as their new base
- DockPanelSuite has been upgraded to version 3.1.1</value>
- The Preinstallation Environment Helper has had some improvements:
- You can now press "B" on the partition selection screen to go back to the disk selection screen if you chose the wrong disk
- The Operating System installer now shows a cleaner progress output for DiskPart and DISM
- The unattended answer file creation wizard can now be resized
- UnattendGen has been updated to the latest version
- The link to report program exceptions has changed to point to its new issue template
- Image information reports are now saved in Markdown</value>
</data>
<data name="split_img" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\split_img.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
Expand Down
Loading

0 comments on commit dc8bcf0

Please sign in to comment.