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