mikecel79 / DISMGUI

DISM GUI is a graphical interface for the DISM command line utility written in the .NET. DISM GUI allows you to mount and dismount WIMs, manager drivers, features and packages.
http://mikecel79.wordpress.com
261 stars 56 forks source link

Unatteneded Servicing does not execute #2

Open FluffyLogic opened 6 years ago

FluffyLogic commented 6 years ago

When using Unatteneded Servicing to apply unattended.xml file, dism throws error :

Command line that ran is dism.exe /image:F:\WIM\MOUNT /Apply-Unattend:

Error: 87

The /Apply-Unattend: option is missing a required argument. 
For more information, refer to the help for the /Apply-Unattend: option.

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

Apparently DISMGUI forgot to append full path of xml to /Apply-Unattend: , causing dism to fail.

Found a problem, but can't test it (also can't create PR, no VB IDE installed):

In file DISMGUI\4.0\DISM GUI\frmMain.vb line 697 reads :

strXMLFileName = txtPatchLocation.Text

but to me it looks it needs to be

strXMLFileName = txtUnattend.Text

Looks like copy/paste error, no big deal :)

mikecel79 commented 5 years ago

Thanks for the feedback. I will try to get this resolved shortly. Haven't had time to really update this in a while.

Dede333 commented 3 years ago

Hello, I'm confirm this,

First step, change the code:

Private Sub btnChooseUnAttend_Click(sender As System.Object, e As System.EventArgs) Handles btnChooseUnAttend.Click dlgOpenXML.InitialDirectory = "c:\" dlgOpenXML.Title = "Choose Unattend XML file to Open" dlgOpenXML.Filter = ("XML Files(.xml)|.xml|All Files (.)|.") Dim DidWork As Integer = dlgOpenXML.ShowDialog

    If DidWork = DialogResult.Cancel Then
        'Do Nothing
    Else
        ' Dim strXMLFileName As String = dlgOpenXML.FileName
        strXMLFileName = dlgOpenXML.FileName
        txtUnattend.Text = strXMLFileName
    End If

End Sub

Second step:

Private Sub btnApplyUnattend_Click(sender As System.Object, e As System.EventArgs) Handles btnApplyUnattend.Click If WIMMounted = False Then MessageBox.Show("No WIM is mounted. You must mount a WIM before running this command.") Else 'Do Nothing End If

    If txtUnattend.Text = "" Then
        MessageBox.Show("You must enter an XML file.")
        Exit Sub
    Else
        'Do Nothing
    End If

    ' strXMLFileName = txtPatchLocation.Text
    strDISMArguments = "/image:" & strMountedImageLocation & " /Apply-Unattend:" & strXMLFileName
    BackgroundWorkerDISMCommand.RunWorkerAsync(strDISMArguments)
    frmProgress.ShowDialog()
    txtOutput.Text = strOutput
End Sub

Thanks and regards.