http://www.itninja.com/blog/view/capturing-wim-s-to-locations-other-than-the-kbox-externally-capturing
This update will work with WinPE 10 and windows 10 imaging.
'<head>
<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>
<HTA:APPLICATION
APPLICATIONNAME="DISM Capture"
SCROLL="no"
SINGLEINSTANCE="yes"
>
</head>
<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
Else
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.")
Else
'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")
WshShell.run strCommand
'MsgBox("Process Complete. Check T:\imagestore\" & imgForm.imgName.value & ".log for errors" )
Set WshShell = nothing
End If
End Sub
</script>
<body>
<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/>
</div>
<table><tr><td VALIGN="baseline">
<div class="list">Compression: </div>
</td>
<td VALIGN="baseline">
<select name="comPrs" id="comPrs">---
<option value="fast">Fast</option>
<option value="maximum">Maximum</option>
<option value="none">None</option>
</select>
</form>
</td>
</tr>
</table>
<br>
<div class="text"><em>Note: Images will be sent to t:\imagestore\.</em></div<br/>
<br>
<br>
<input type="button" value="Start Capture" name="StartCapture" onClick="StartCapture">
<span id = "DataArea"></span>
</body>
Comments