/build/static/layout/Breadcrumb_cap_w.png

Capturing WIM images locally with custom KBE

Since K2 v3.5 takes away the ability to capture WIM images to the RSA (which was made available with the 3.4 KNIT) I have been searching for a good method to restore this ability.  A helpful KACE support rep showed me how to incorporate GimageX, which is a third party tool that is basically a graphical shell of imagex, into my KBE.  But it requires opening a command prompt and calling a batch file to start the tool up.  Not the most user-friendly process for people who were used to pointing and clicking to start a capture.

Also, imagex is technically not supported with Windows 8 or Server 2012, and I didn't have much success capturing a Windows 8 image using GimageX as a result.  The remaining option is to use the /Capture-Image command with DISM, which was made available in WinPE 4.  Except...the K2 doesn't use WinPE 4 yet.  So, what is the solution?

I am experimenting with a custom KBE using the WinPE boot.wim from the ADK (which is WinPE 4) with custom commands added to the startnet.cmd file.  If you don't know how to manipulate boot.wim, research "custom WinPE" to get started, it's not very difficult.  You upload your finished boot.wim with the KBE Manipulator using the "Custom .iso" option.

I decided to post this experiment here for feedback, and to see if anyone else could benefit from this in some way.  It may seem like a lot of work when I could just capture to the K2 using the existing method, but in my environment that is not a good solution because we have 80+ locations and I can't manage separate images for each one.

Here is the basic example of my startnet.cmd:

@echo off

title Follow the prompts to capture your image

wpeinit

SET /P School=What is your school number?:

net use t: \\%School%m\%School%m\image password /user:dsdut\image

SET /P Name=What would you like to name your image?:

Dism /Capture-Image /ImageFile:T:\ImageStore\%Name%.wim /CaptureDir:C:\ /Name:"%Name%"

echo Finished.

Exit

As you can see, after the "wpeinit" command the user will be prompted to provide input that will be used as a parameter for the "net use" command.  That line maps the T: drive to a server share that is named according to school number.  For instance, typing "402" at the prompt will turn "\\%School%m\%School%m\image" into "\\402m\402m\image", where the ImageStore folder resides.

The next line asks for input again, and uses it to supply the name of the .wim file in the same basic fashion.  With the "@echo off" statement, all the user will see in this KBE is an empty command prompt window as WinPE is initializing, then it will display each question along with the user-inputted response, and finally the capture progress.  After the capture is complete it will exit the KBE and the computer will reboot automatically (which doesn't happen in the official KBE, and if desired you can eliminate the "Exit" command to stop this from happening).

I have a second custom KBE that's slightly more in-depth:

 @echo off

 title Follow the prompts to capture your image

 wpeinit

 SET /P School=What is your school number?:

 IF /I "%School%" == "cts" GOTO Image1

IF "%School%" GEQ "146" GOTO Image2

 :Image1

net use t: \\image1\image1\%School% password /user:dsdut\image
GOTO End

 :Image2

net use t: \\image2\image2\%School% password /user:dsdut\image

 :End

 SET /P Name=What would you like to name your image?:

 Dism /Capture-Image /ImageFile:T:\ImageStore\%Name%.wim /CaptureDir:C:\ /Name:"%Name%"

 echo Finished.

 Exit

In this case, we have two separate servers setup as image shares, and certain schools are assigned to each one.  I didn't want to build two separate KBEs if I could use the school number parameter to determine which share to map.  Using the GEQ (greater than or equal) variable or any of its counterparts appropriately, I can tell it to map T: to \\image2 if the school number was 146 or higher, and if 145 or lower it will automatically use \\image1 by default.  I even have a little caveat in there for our tech department, so if I type "cts" it will also map to \\image1 since we use that server also (and since I can't use "cts" along with the GEQ variable).

This is the only method I can think of for capturing Windows 8 images directly to the RSA.  If someone has a different method I would be interested in knowing about it.  I've noticed that hardly anyone is very interested in capturing directly to the RSA (and apparently KACE saw this too and thus nixed the ability in 3.5) and I wish we didn't need to, but our structure dictates it.  Plus, I like having the raw WIM files to mount and edit.

Thanks for reading!

 

Comments

This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ