Hide cscript.exe window for MDT general purpose wizard hook
As you could notice at this post by Michael Niehaus, on a back there is a big "dos" window with a script being running.
This happens because OSD always runs windows scripts in pre-exec hook with CSCRIPT.EXE, even if you specify WSCRIPT.EXE in the command line.
In order to hide it, simply copy files to your C:\Program Files\Microsoft Deployment Toolkit\SCCM\ folder with files from archive attached to this post.
You will need to rebuild your MDT boot image or mount it and update files there. Keep in mind that tsconfig.ini resides in the root folder.
If you don’t want to re-create your MDT boot image, you can replacetsconfig.ini in the existing source WIM with mine tsconfig.ini and place two EXE in Deploy\scripts.
PS: Tricky part was to make it both x86/x64. Thanks god %PROCESSOR_ARCHITECTURE% worked in the command line.
Update: you'll always have to manualy add AMD64ZTIMediaHook.exe and x86ZTIMediaHook.exe files to Deploy\Scripts folder in your image. Even for new boot images, after you create them.
C-Program Files-Microsoft Deployment Toolkit-SCCM.zip
Comments
- Anonymous
April 14, 2014
Hi AlexThanks for your hint. This hit brought me to a solution without using additional files.As soon you have PowerShell included in the BootImage, you can wrap the command thought PowerShell.exe. I wrote a small post about this in my blog: spali.ch/hide-command-window-default-mdt-2013-prestart-command-sccmJust wanted to share this solution and thank you.