This is the capture wim compliment to blog http://www.itninja.com/blog/view/wim-storage-k2000-version-3-7-freeing-up-space-on-your-k2000-if-you-are-using-wims-and-speed-up-deployment-using-network-windows-shares
Using KBE manipulator you can create dedicated KBE’s set to capture an image to a specific location.
Since I am using DISM to deploy my wims I am using winpe5
First we will create HTA files and place them in you
directory you use to upload portable applications to the KBEM
If you have not used this feature prior create a dedicated directory on your tech station that you will place these files in as well as the remap exe's you created using AutoIT in this blog: http://www.itninja.com/blog/view/wim-storage-k2000-version-3-7-freeing-up-space-on-your-k2000-if-you-are-using-wims-and-speed-up-deployment-using-network-windows-shares
Use Notepad++ or Wordpad to paste this code and save as a HTA file like pictured above (Capture_wim.hta = this generic HTA Code)
'<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="ImageX 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\imagex.exe /capture /verify /compress" & " " & imgForm.comPrs.value & " " & imgForm.srcDrive.value & ":" & " " & "t:\imagestore\" & imgForm.imgName.value & ".wim" & " " & "'" & imgForm.imgName.value & "'" & " " & "/logfile" & " " & "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>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>
I prefer to create multiple HTA’s that display the path the captured WIM will go to.
To create a custom HTA for each server, change this line in the code. (This only changes the user display, does not actually control the capture location, the map.exe does that)
<div class="text"><em>Note: Images will be sent to t:\imagestore\.</em></div<br/>
to something more specific to suit your needs<div class="text"><em>Note: Images will be sent to \\msacad2\k2000\images\imagestore\.</em></div<br/>
Start the KBEM and choose the tool kit
Fill in the KBE information
From the configure dropdown choose “Modify KBE Tools”
Check “add Files to KBE”
Browse to and choose the location of the local directory you
want to upload to x:\applications.
Uncheck “Kace Deployment Menu”
From the configure dropdown choose “Add custom DOS command(s)”
Call the remap and hta file from the x:\applications directory
Say OK and Click create KBE:
----------------------------------------------------------------------------------------------------
Using the KBE you just created:
Pxe boot and choose the KBE for capturing and let it load
File in the name of the WIM and drive letter and click capture.
Generic Capture HTA
modified Capture HTA
I was curious to know if you've created/modified a KBE for UEFI images that capture the c: and s: drives. Is there some small tweak I can do to achieve at least pushing a UEFI image from an external location since it captures both drives in separate wims? - animerunt 9 years ago