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.
Here is what the Task Sequence looks like:
Step Name Text:
Expanding %OSDImageName% (%ImageSize%) to %OSDisk%\…
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
/BG