Hide Command Window of Default MDT 2013 prestart command in SCCM

If you want to hide the big ugly black command window of the default prestart command wizard hook. You can fin one way to do that at Alexsemi’s Blog.

His version is to workaround the inject of SCCM MDT with cscript.exe, by wrapping it with an AutoIt exe. This way OSD won’t replace the wscript.exe call with cscript.exe. So there is no window visible.
But because I don’t like to have any unnecessary files, I found a solution with a PowerShell call.

This requires that you have PowerShell included in your Boot Image, but because PowerShell is really powerful and easy to use in OSD deployment,  I can suggest to start using it anyway.

The solution is simple, just replace the default prestart command

with the following:

With it, you have the same effect without additional files if you already have PowerShell included in the Boot Image.

Note: Pipe to Out-Host is one way to force PowerShell to wait for the process to finish.

Update:
I just realized , that there is still for a short amount of time a PowerShell console visible. I researched a bit and found out, that this is a limitation, because PowerShell is a console application for which Windows always creates an Console first. PowerShell just hide it as soon as possible with the “Hidden” parameter given.
So if you can’t accept that short “Popup” than you have to use a wrapper as described in Alexsemi’s Blog.

About 

Currently not much to say.
Just another geek which want to share some experience and also write it down to keep some stuff documented.

    Find more about me on:
  • facebook
  • googleplus
  • twitter

Leave a Reply

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