I’ve created messages and pauses a couple of ways, a “fancy” way with content, based on Niehaus’s blog, and a simple way just using notepad with no content, which is really handy during times you don’t want (or not able) to pull down content yet. Nash (@kidmystic) would say to use PowerShell (example at bottom), as he has a nifty one line code that will do it for you. However, if you don’t have PowerShell in WinPE, and want to keep it super simple, just do it this way… with notepad.
In the Task Sequence, where you want to create a pause, or message, create two “Run Command line” Steps.
- Run Command Line Step 1 = “Create Pause - Step 1”
- Run Command Line Step 2 = “Run Pause - Step 2”
This will work even if the HDD is not formatted, as it does not require content. To Confirm, I Diskpart –> Clean the HDD so nothing was on it, then ran these steps in WinPE. Worked perfect. This is great for if you want to pause / blow up your TS early if it it fails any validations, like Bios Password Missing, or UEFI not enabled, etc.
When you close the Notepad Application, the TS will Resume.
powershell.exe -command (new-object -ComObject Microsoft.SMS.TsProgressUI).CloseProgressDialog() ; (new-object -ComObject wscript.shell).Popup('Message Box Text Content goes Here, you can make this as detailed as you want.',0,'Message Box Title in Upper Left',0x0 + 0x30) ; Exit 1
- Set your Exit code to what make sense. Exit 1 will “Fail” your TS and make it quit, which might be good in times that you want it to fail so something manually can be done. Exit 0 will be success and continue on.
During IPU (NOT OSD, but when running a TS post OSD, and in Windows), you'll need to use ServiceUI, steal it from the MDT Toolkit.
Command: ServiceUI.exe -process:TSProgressUI.exe %WINDIR%\System32\cmd.exe
7 thoughts on “Task Sequence Message / Pause with No Package”
This is great man. Very useful.
Hi, thx for this post but - as i know task sequences are running as system and so you will never this this msgbox on your users screen, as they are hopefully not logged on as system 😉
running this unique ts step is as another user account is not an option for me - so does have anyone an idee for to fix?
thx for excellent replies
You're half right. During OSD this works fine, as the entire process is running as system. If you're running a NON-OSD Task Sequence Post deployment for IPU or software install, you are correct. You would need to leverage serviceUI. You can see examples on several of my other posts where I use ServiceUI to launch a task for the user to interact with, like this: https://garytown.com/bgin-place-upgrades or https://garytown.com/send-text-and-email-to-user-from-task-sequence
I tried keeping both commands together in a single step using && and it seems to work. Just means you have a single "PAUSE" step instead of the 2.
cmd.exe /c echo "Pausing Task Sequence for Testing, Close this Box to continue the Task Sequence" >> Pause.txt && cmd.exe /c notepad.exe Pause.txt
cmd /c start "TS is paused until this cmd is closed" /wait cmd