Keeping An Eye On USMT Progress v0.2

Back in June I posted a script that I’d written that displays the progress of the USMT capture and recover phases in a neat HTML window off to one side of the screen; particularly useful if you are capturing/recovering large amounts of data because otherwise it looked like the USMT progress had hung due to the progress bar not moving along for quite some time.

While the script I wrote worked fine I was not 100% happy with it, mostly because it ate up too many CPU cycles, which could sometimes slow down the actual USMT progress; an effect that you would never want to happen!  The problem was that there was no quick and easy way to parse the last few lines of a text file in VBScript without first reading in all the previous lines.  This meant that as the log file grew, my script took longer and longer to run.  So, I took it back to the drawing board, and reworked the innards of it to produce version 0.2!

shot

This time, the script runs extremely quickly and it will barely register on the CPU, meaning that it shouldn’t slow anything else down.  It still requires the same parameters to be passed to it when adding to the task sequence, which are detailed below.  To add it to the task sequence, simply add the following Run Command Line action before the USMT capture or restore actions (or both):

cmd.exe /c “start /MIN cscript.exe Z:\Scripts\CUSTOM_USMT_Tracker.vbs C:\MININT\SMSOSD\OSDLOGS\USMTCapture.prg”

cmd.exe /c “start /MIN cscript.exe Z:\Scripts\CUSTOM_USMT_Tracker.vbs C:\MININT\SMSOSD\OSDLOGS\USMTRestore.prg”

It also has one other very important dependency.  You must download tail.exe from the Windows Resource Kit and place it in the Tools folder of the MDT deployment share, along with this script.  You can get the tool here, it doesn’t matter that it is the 2003 version, I have tested it on Windows 7 and it works fine.  If you don’t put tail.exe in the tools folder, then the script will fail.

The next update might take a while to get round to doing, but I want to remove the requirements for the command-line parameter, and have the script find the progress file on it’s own.  Also, it would be good to display more information rather than just the current position in the progress, perhaps an extra line that informs what the current task is that is being run.  Also, a few cosmetic changes wouldn't go amiss, but I am a techie not a graphic designer!

 

Attached to this post is the script file.

 

This post was contributed by Daniel Oxley a consultant with Microsoft Consulting Services Spain

Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the Terms of Use .

CUSTOM_USMT_Tracker.vbs