I needed a quick way to run a script after certain task sequences. MDT doesn’t really have a way to do this after everything completely finishes. I took my own approach, being a programmer I did modify litetouch.wsf.
Here’s what I did, for anyone interested. Open up litetouch.wsf in the deployment share scripts directory, find the line “Process the finish action” and immediately above it, enter this code which I have in mine:
'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 'MM: FINISHING SCRIPT Dim mm_WshShell Dim mm_filesys Set mm_WshShell = WScript.CreateObject("WScript.Shell") Set mm_filesys = CreateObject("Scripting.FileSystemObject") If mm_filesys.FileExists("c:\Windows\MM_Finish.exe") Then mm_WshShell.Run "c:\Windows\MM_Finish.exe", 0, true End If 'MM: /FINISHING SCRIPT '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note that in this instance, if it finds “c:\Windows\MM_Finish.exe” it will run the file (and wait for it to complete). An easy way to get this file there is to create an application install that moves the file over, then put an install application task into the sequence.
Done! I prefer this way as this happens at the very end.