Using USMTUtils.exe during a Task Sequence with ConfigMgr 2007

As I had a lot of questions about the use of USMTUtils, I decided to devote a new post to this. In my previous post I used USMTUtils to clean up the hard-link statestore location.

USMTUtils is needed to clean up a hard-link statestore, because otherwise the hard-link store cannot be deleted due to a sharing lock. The command-line provided by Technet to do this is usmtutils.exe /rd <storedirectory>. Only this is exactly where the problem starts when running a command like this during a Task Sequence, because this will make the Task Sequence “hang” on the point where it has to delete the hard-link statestore. Taking a look at the SMSTS.log, at this point, will show something similar to this:

<![LOG[Executing command line: Run command line]LOG]!><time="14:56:41.804+-60" date="03-23-2010" component="InstallSoftware" context="" type="1" thread="2904" file="commandline.cpp:805">
<![LOG[]LOG]!><time="14:56:42.148+-60" date="03-23-2010" component="InstallSoftware" context="" type="1" thread="2904" file="runcommandline.cpp:34">
<![LOG[WARNING: This command is going to delete the following list of path(s).]LOG]!><time="14:56:42.195+-60" date="03-23-2010" component="InstallSoftware" context="" type="1" thread="2904" file="runcommandline.cpp:34">
<![LOG[Please review before continuing …]LOG]!><time="14:56:42.195+-60" date="03-23-2010" component="InstallSoftware" context="" type="1" thread="2904" file="runcommandline.cpp:34">

After this I just tried running the command-line manually from a cmd in Windows and this showed the following information:

WARNING: This command is going to delete the following list of path(s).
Please review before continuing …

        C:\<storedirectory>

Are you sure you want to proceed (Y/N)?

The conclusion here is that running the command-line usmtutils.exe /rd <storedirectory> will need a confirmation. This is the point where we have to grab back to a batch-file, so we can pipeline a positive response to the question asked by the USMTUtils. This can be done by using echo y|. So the batch-file, that we need to run the USMTUtils from a Task Sequence (with ConfigMgr 2007), has to include the command-line echo y| usmtutils.exe /rd <storedirectory>.

I hope this post gives a bit more inside information of why it is needed to pipeline a confirmation with the use of USMTUTils.

Share

Leave a Comment