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

DISMTools 0.6 Preview 8 #202

Merged
merged 17 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
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
Binary file modified 7z/amd64/7z.dll
Binary file not shown.
Binary file modified 7z/amd64/7z.exe
Binary file not shown.
Binary file modified 7z/i386/7z.dll
Binary file not shown.
Binary file modified 7z/i386/7z.exe
Binary file not shown.
8 changes: 4 additions & 4 deletions DISMTools.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@
<Reference Include="PresentationFramework">
<Private>True</Private>
</Reference>
<Reference Include="Scintilla.NET, Version=5.6.2.0, Culture=neutral, PublicKeyToken=0221e70ba618311e, processorArchitecture=MSIL">
<HintPath>packages\Scintilla5.NET.5.6.2\lib\net462\Scintilla.NET.dll</HintPath>
<Reference Include="Scintilla.NET, Version=5.6.3.0, Culture=neutral, PublicKeyToken=0221e70ba618311e, processorArchitecture=MSIL">
<HintPath>packages\Scintilla5.NET.5.6.3\lib\net462\Scintilla.NET.dll</HintPath>
</Reference>
<Reference Include="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<Private>True</Private>
Expand Down Expand Up @@ -1988,12 +1988,12 @@ IF EXIST tools (

IF EXIST "report.html" (del "report.html")</PreBuildEvent>
</PropertyGroup>
<Import Project="packages\Scintilla5.NET.5.6.2\build\scintilla5.net.targets" Condition="Exists('packages\Scintilla5.NET.5.6.2\build\scintilla5.net.targets')" />
<Import Project="packages\Scintilla5.NET.5.6.3\build\scintilla5.net.targets" Condition="Exists('packages\Scintilla5.NET.5.6.3\build\scintilla5.net.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\Scintilla5.NET.5.6.2\build\scintilla5.net.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Scintilla5.NET.5.6.2\build\scintilla5.net.targets'))" />
<Error Condition="!Exists('packages\Scintilla5.NET.5.6.3\build\scintilla5.net.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Scintilla5.NET.5.6.3\build\scintilla5.net.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Public Property Enabled As Boolean = True

''' <summary>
''' Determines whether to use default Windows lockdown policies
''' Determines whether to use default Windows lockout policies
''' </summary>
''' <value></value>
''' <returns></returns>
Expand Down
3 changes: 2 additions & 1 deletion Elements/AutoUnattend/UserAccounts/User.vb
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@
If userList Is Nothing OrElse userList.Count = 0 Then
Return False
End If
Dim ExistingUsers() As String = New String(5) {"administrator", "guest", "defaultaccount", "system", "network service", "local service"}
' Assume it's true by default
Dim FullyValid As Boolean = True
For Each listedUser As User In userList
If listedUser.Enabled Then
If listedUser.Name = "" OrElse listedUser.Name = "Administrator" Then
If listedUser.Name = "" OrElse ExistingUsers.Contains(listedUser.Name, StringComparer.OrdinalIgnoreCase) Then
FullyValid = False
Exit For
Else
Expand Down
162 changes: 98 additions & 64 deletions MainForm.vb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' mediante el asterisco ('*'), como se muestra a continuación:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("0.6.0.24112")>
<Assembly: AssemblyFileVersion("0.6.0.24112")>
<Assembly: AssemblyVersion("0.6.0.24121")>
<Assembly: AssemblyFileVersion("0.6.0.24121")>
37 changes: 28 additions & 9 deletions My Project/Resources.Designer.vb

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

44 changes: 33 additions & 11 deletions My Project/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -789,21 +789,26 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
<data name="WhatsNew" xml:space="preserve">
<value>Bugfixes:

- The image information report results dialog no longer mentions a text box
- Italian translations have been slightly fixed (thanks @bovirus for spotting)
- Fixed an issue where a log path warning would be triggered during serviceability tests with the OS installer
- Fixed an exception that would sometimes happen when launching the AppX package addition dialog
- Fixed an issue where operations would no longer start sometimes
- Fixed a visual issue with the image file information list view of the ISO creation wizard
- Fixed an issue where the program would throw an IO exception when getting information about AppX packages, such as Intel Graphics Experience or MSI Center, in some cases (#199, #200, thanks @yyg1208 for spotting)
- Fixed a startup exception related to the mounted image detector (#201, thanks @Oldsch00lpunk for spotting)
- The DynaLog logging system has seen some fixes in the log maintenance functions

New features:

- The DynaLog logging system has received log cleanup functionality
- Improvements have been made to the installers (#192, thanks @bovirus)
- The Scintilla.NET component has been updated to version 5.6.3
- 7-Zip has been updated to version 24.09

- Unattended answer file features

- UnattendGen has been updated to the latest version
- Exception reporting now includes information about whether or not a copy is portable
- During ISO creation, the taskbar button will now show a progress bar
- The mask character of password fields in the unattended answer file generation wizard has been updated
- Image file information in the ISO creation wizard is now shown in a list view
- The program now detects verified AME Playbooks and logs results with DynaLog. This is done to help isolate issues more</value>
- User passwords are now encoded (obscured) with Base64 by default, for increased security
- The default window size has been increased
- You can now make the target system ask for a Microsoft account interactively
- More account checks have been added. Now, you need at least one user in the Administrators group before continuing with the creation of your answer file
- After creating an answer file, if you want to create another one, you can now decide whether or not to reuse what you used for the answer file
- More user name checks have been added, keeping you from using more system user names and groups (such as Guest or SYSTEM)</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 Expand Up @@ -928,4 +933,21 @@ New features:
<data name="set_layeredkeyboarddriver" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\set_layeredkeyboarddriver.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DefaultDiskPartConfig" xml:space="preserve">
<value>REM EXAMPLE SCRIPT. PLEASE MODIFY
REM -----------------------------------------
SELECT DISK=0
CLEAN
CONVERT GPT
CREATE PARTITION EFI SIZE=300
FORMAT QUICK FS=FAT32 LABEL="System"
CREATE PARTITION MSR SIZE=16
CREATE PARTITION PRIMARY
SHRINK MINIMUM=1000
FORMAT QUICK FS=NTFS LABEL="Windows"
CREATE PARTITION PRIMARY
FORMAT QUICK FS=NTFS LABEL="Recovery"
SET ID="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
GPT ATTRIBUTES=0x8000000000000001</value>
</data>
</root>
10 changes: 10 additions & 0 deletions Panels/Exe_Ops/Options.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2477,6 +2477,7 @@ Public Class Options
Select Case My.Computer.Info.InstalledUICulture.ThreeLetterWindowsLanguageName
Case "ENU", "ENG"
If Button8.Text = "Stop" Then
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
ElseIf Button8.Text = "Start" Then
Call MainForm.MountedImageDetectorBW.RunWorkerAsync()
Expand All @@ -2485,6 +2486,7 @@ Public Class Options
Button8.Text = If(MainForm.MountedImageDetectorBW.IsBusy, "Stop", "Start")
Case "ESN"
If Button8.Text = "Detener" Then
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
ElseIf Button8.Text = "Iniciar" Then
Call MainForm.MountedImageDetectorBW.RunWorkerAsync()
Expand All @@ -2493,6 +2495,7 @@ Public Class Options
Button8.Text = If(MainForm.MountedImageDetectorBW.IsBusy, "Detener", "Iniciar")
Case "FRA"
If Button8.Text = "Arrêter" Then
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
ElseIf Button8.Text = "Démarrer" Then
Call MainForm.MountedImageDetectorBW.RunWorkerAsync()
Expand All @@ -2501,6 +2504,7 @@ Public Class Options
Button8.Text = If(MainForm.MountedImageDetectorBW.IsBusy, "Arrêter", "Démarrer")
Case "PTB", "PTG"
If Button8.Text = "Parar" Then
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
ElseIf Button8.Text = "Iniciar" Then
Call MainForm.MountedImageDetectorBW.RunWorkerAsync()
Expand All @@ -2509,6 +2513,7 @@ Public Class Options
Button8.Text = If(MainForm.MountedImageDetectorBW.IsBusy, "Parar", "Iniciar")
Case "ITA"
If Button8.Text = "Arresto" Then
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
ElseIf Button8.Text = "Avvio" Then
Call MainForm.MountedImageDetectorBW.RunWorkerAsync()
Expand All @@ -2518,6 +2523,7 @@ Public Class Options
End Select
Case 1
If Button8.Text = "Stop" Then
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
ElseIf Button8.Text = "Start" Then
Call MainForm.MountedImageDetectorBW.RunWorkerAsync()
Expand All @@ -2526,6 +2532,7 @@ Public Class Options
Button8.Text = If(MainForm.MountedImageDetectorBW.IsBusy, "Stop", "Start")
Case 2
If Button8.Text = "Detener" Then
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
ElseIf Button8.Text = "Iniciar" Then
Call MainForm.MountedImageDetectorBW.RunWorkerAsync()
Expand All @@ -2534,6 +2541,7 @@ Public Class Options
Button8.Text = If(MainForm.MountedImageDetectorBW.IsBusy, "Detener", "Iniciar")
Case 3
If Button8.Text = "Arrêter" Then
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
ElseIf Button8.Text = "Démarrer" Then
Call MainForm.MountedImageDetectorBW.RunWorkerAsync()
Expand All @@ -2542,6 +2550,7 @@ Public Class Options
Button8.Text = If(MainForm.MountedImageDetectorBW.IsBusy, "Arrêter", "Démarrer")
Case 4
If Button8.Text = "Parar" Then
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
ElseIf Button8.Text = "Iniciar" Then
Call MainForm.MountedImageDetectorBW.RunWorkerAsync()
Expand All @@ -2550,6 +2559,7 @@ Public Class Options
Button8.Text = If(MainForm.MountedImageDetectorBW.IsBusy, "Parar", "Iniciar")
Case 5
If Button8.Text = "Arresto" Then
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
ElseIf Button8.Text = "Avvio" Then
Call MainForm.MountedImageDetectorBW.RunWorkerAsync()
Expand Down
1 change: 1 addition & 0 deletions Panels/Get_Ops/Capabilities/GetCapabilityInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ Public Class GetCapabilityInfoDlg
End While
End If
If MainForm.MountedImageDetectorBW.IsBusy Then
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
While MainForm.MountedImageDetectorBW.IsBusy
Application.DoEvents()
Expand Down
1 change: 1 addition & 0 deletions Panels/Get_Ops/Drivers/GetDriverInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ Public Class GetDriverInfo
End While
End If
If MainForm.MountedImageDetectorBW.IsBusy Then
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
While MainForm.MountedImageDetectorBW.IsBusy
Application.DoEvents()
Expand Down
1 change: 1 addition & 0 deletions Panels/Get_Ops/Features/GetFeatureInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ Public Class GetFeatureInfoDlg
End While
End If
If MainForm.MountedImageDetectorBW.IsBusy Then
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
While MainForm.MountedImageDetectorBW.IsBusy
Application.DoEvents()
Expand Down
1 change: 1 addition & 0 deletions Panels/Get_Ops/GetImgInfoDlg.vb
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ Public Class GetImgInfoDlg

Sub GetImageInfo(ImageFile As String)
If MainForm.MountedImageDetectorBW.IsBusy Then
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
While MainForm.MountedImageDetectorBW.IsBusy
Application.DoEvents()
Expand Down
12 changes: 12 additions & 0 deletions Panels/Get_Ops/InfoSave/ImgInfoSaveDlg.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2464,6 +2464,7 @@ Public Class ImgInfoSaveDlg

' Stop the mounted image detector, as it makes the program crash when performing DISM API operations
If MainForm.MountedImageDetectorBW.IsBusy Then
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
While MainForm.MountedImageDetectorBW.IsBusy
Application.DoEvents()
Expand All @@ -2477,6 +2478,17 @@ Public Class ImgInfoSaveDlg
Thread.Sleep(100)
End While

' Close the image registry control panel before continuing. Operations with the DISM API open the image registry hives, something
' the control panel already loads. This causes the program to freeze for around a minute and then create a report with an
' exception thrown
If RegistryControlPanel.Visible Then
RegistryControlPanel.Close()
If RegistryControlPanel.Visible Then
Close()
Exit Sub
End If
End If

' Create the target if it doesn't exist
If Not File.Exists(SaveTarget) Then
Try
Expand Down
Loading
Loading