This is an update of the hta code to use DISM vs imagex from this Blog:

This update will work with WinPE 10 and windows 10 imaging.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="deployment_client.css" />

<title>WIM Capture</title>

<script language="VBScript">
'Resize window
Sub Window_onLoad
window.resizeTo 400,400
End Sub

'Verify t:\imagestore exists
Sub StartCapture

Dim imgForm
Set imgForm = Document.forms("imgForm")

Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists ("t:\imagestore") Then
Set objFolder = objFSO.CreateFolder("t:\imagestore")
End if

'Verify image is not already on T:\imagestore
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists("t:\imagestore\" & imgForm.imgName.value & ".wim") Then
MsgBox("The WIM image already exists. Please use a different name")
ElseIf imgForm.imgName.value = "" Then
MsgBox("A blank name is not allowed.")
'Start Image Capture
strCommand = "%systemdrive%\windows\system32\dism.exe /Capture-Image /ImageFile:t:\imagestore\" & imgForm.imgName.value & ".wim /CaptureDir:" & imgForm.srcDrive.value & ":\ /Name:" & imgForm.imgName.value & " /compress:" & imgForm.comPrs.value & " /logpath:t:\imagestore\" & imgForm.imgName.value & ".log"
Set wshShell = CreateObject("WScript.Shell") strCommand
'MsgBox("Process Complete. Check T:\imagestore\" & imgForm.imgName.value & ".log for errors" )
Set WshShell = nothing
End If
End Sub


<h1>DISM WIM Capture</h1>

<form id="imgForm" action="">
<div class="list">Image Name: <input type="text" name="imgName" id="imgName" size="20" maxlength="10">.wim</div>
<div class="list">Source Drive: <input type="text" name="srcDrive" id="srcDrive" size="1" maxlength="1">:</div<br/>

<table><tr><td VALIGN="baseline">
<div class="list">Compression: </div>
<td VALIGN="baseline">
<select name="comPrs" id="comPrs">---
<option value="fast">Fast</option>
<option value="maximum">Maximum</option>
<option value="none">None</option>
<div class="text"><em>Note: Images will be sent to t:\imagestore\.</em></div<br/>
<input type="button" value="Start Capture" name="StartCapture" onClick="StartCapture">

<span id = "DataArea"></span>