Display the WIM filename during Image Apply step Dynamically

By | November 30, 2016
Share

Since there is no MDT built-in variable assigned with just the wim name, i had to create a seperate step to create the variable “OSDImageName”, which i  then used in my standard image apply step.

osdnameduringtasksequence

Here is what the Task Sequence looks like:

Step Name Text:
Expanding %OSDImageName% (%ImageSize%) to %OSDisk%\…

usingosdimagename

And here is how I create the OSDImageName variable.

cmd /c echo Set objShell=WScript.CreateObject("Wscript.Shell"):objShell.run "cscript.exe //nologo ""%SCRIPTROOT%\ZTISetVariable.wsf"" /VariableName:OSDImageName /VariableValue:"""^&Split(Mid("%InstallFromPath%",Len("%SourcePath%")),"\")(1)^&"""" > %temp%\test.vbs,1,True && wscript //nologo %temp%\test.vbs

populatingosdimagename

/BG

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.