Skip to content

Commit ffc6fcb

Browse files
committed
Fix AppX package addition not working on Windows 8 images
1 parent 7c4853a commit ffc6fcb

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

Installer/Output/dt_setup.exe

3.47 KB
Binary file not shown.

MainForm.vb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ Public Class MainForm
220220
Dim CapabilityInfoList As DismCapabilityCollection
221221
Dim DriverInfoList As DismDriverPackageCollection
222222

223+
Public imgVersionInfo As Version = Nothing
224+
223225
Friend NotInheritable Class NativeMethods
224226

225227
Private Sub New()
@@ -1696,6 +1698,7 @@ Public Class MainForm
16961698
If Streamlined Then
16971699
If OnlineMode Then
16981700
Label17.Text = Environment.OSVersion.Version.Major & "." & Environment.OSVersion.Version.Minor & "." & Environment.OSVersion.Version.Build & "." & FileVersionInfo.GetVersionInfo(Environment.GetFolderPath(Environment.SpecialFolder.Windows) & "\system32\ntoskrnl.exe").ProductPrivatePart
1701+
imgVersionInfo = Environment.OSVersion.Version
16991702
Select Case Language
17001703
Case 0
17011704
Select Case My.Computer.Info.InstalledUICulture.ThreeLetterWindowsLanguageName
@@ -1954,6 +1957,7 @@ Public Class MainForm
19541957
Dim ImageInfoCollection As DismImageInfoCollection = DismApi.GetImageInfo(MountedImageImgFiles(x))
19551958
For Each imageInfo As DismImageInfo In ImageInfoCollection
19561959
If imageInfo.ImageIndex = MountedImageImgIndexes(x) Then
1960+
imgVersionInfo = imageInfo.ProductVersion
19571961
imgMountedName = imageInfo.ImageName
19581962
imgMountedDesc = imageInfo.ImageDescription
19591963
imgHal = If(Not imageInfo.Hal = "", imageInfo.Hal, "Undefined by the image")

My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
3131
' mediante el asterisco ('*'), como se muestra a continuación:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("0.3.1.2385")>
35-
<Assembly: AssemblyFileVersion("0.3.1.2385")>
34+
<Assembly: AssemblyVersion("0.3.1.2394")>
35+
<Assembly: AssemblyFileVersion("0.3.1.2394")>

Panels/DoWork/ProgressPanel.vb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ Public Class ProgressPanel
199199

200200
Public ActionParameters As New List(Of String)
201201

202+
Dim ImgVersion As Version
203+
202204
' Initial settings
203205
Dim DismExe As String
204206
Dim AutoLogs As Boolean
@@ -2651,7 +2653,7 @@ Public Class ProgressPanel
26512653
LogView.AppendText(CrLf & _
26522654
"Warning: the custom data file does not exist. Continuing without one...")
26532655
End If
2654-
If FileVersionInfo.GetVersionInfo(DismProgram).ProductMajorPart = 10 Then
2656+
If FileVersionInfo.GetVersionInfo(DismProgram).ProductMajorPart = 10 And ImgVersion.Major = 10 Then
26552657
If appxAdditionPackageList(x).PackageRegions = "" Then
26562658
CommandArgs &= " /region:all"
26572659
Else
@@ -4411,6 +4413,7 @@ Public Class ProgressPanel
44114413
Language = MainForm.Language
44124414
AllDrivers = MainForm.AllDrivers
44134415
BodyPanel.BorderStyle = BorderStyle.None
4416+
ImgVersion = MainForm.imgVersionInfo
44144417
' Determine program colors
44154418
If MainForm.BackColor = Color.FromArgb(48, 48, 48) Then
44164419
BodyPanel.BackColor = Color.FromArgb(37, 37, 38)

Panels/Img_Ops/AppxPkgs/AddProvAppxPackage.vb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ Public Class AddProvAppxPackage
356356
Dim handle As IntPtr = MainForm.GetWindowHandle(Me)
357357
If MainForm.IsWindowsVersionOrGreater(10, 0, 18362) Then MainForm.EnableDarkTitleBar(handle, MainForm.BackColor = Color.FromArgb(48, 48, 48))
358358
AppxDetailsPanel.Height = If(ListView1.SelectedItems.Count <= 0, 520, 83)
359-
GroupBox3.Enabled = If(FileVersionInfo.GetVersionInfo(MainForm.DismExe).ProductMajorPart < 10, False, True)
359+
GroupBox3.Enabled = If(FileVersionInfo.GetVersionInfo(MainForm.DismExe).ProductMajorPart < 10 Or Not MainForm.imgVersionInfo.Major >= 10, False, True)
360360
End Sub
361361

362362
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

0 commit comments

Comments
 (0)