Moving the MDT wizard off your boot disk
*Update – 02/12/2010*
– Fixed a couple of script syntax issues, thanks Todd Miller!
So this is something we used in our past solution, and also now have adopted it within our MDT\SCCM deployment solution. What I will describe is the ability to move any Custom Front End or MDT Wizard or any other scripts you execute before the task sequence off of the boot disk and on to a master share. Why do this? Mainly to avoid having to update your boot disk every single time you make a script or wizard change.
First you will need to create a share if you don't already have one and subdirectories. You do not have to follow my structure but here is an example of how we have set up our bootdisk structure:
Setup Folder Structure
- Master Share = \\CentralServer\MDT$
- Master Share containing all boot disk related folders
- Boot Disk Folder = %Master Share%\Bootdisk
- Folder used to organize everything related to boot disk
- Boot_Menu Folder = %Master Share%\Bootdisk\Boot_Menu
- Contains MDT Wizard or Custom Front End
- Additional_Files Folder = %Master Share%\Bootdisk\Additional_Files
- Contains ZTIMediaHook script that connects to Boot Menu Folder
Setup Files within Folders
- Copy the attached ZTIMediahook.wsf and ZTIUtility.vbs file into your Additional_Files folder.
Example:
- %Additional_Files%\Deploy\Scripts\ZTIMediahook.wsf
- % Additional_Files%\Deploy\Scripts\ZTIUtility.vbs
- Copy your MDT Wizard or Custom Wizard and associated scripts to your Boot Menu folder
Example:
- %Boot_Menu%\MasterMediaHook.wsf
- %Boot_Menu%\Wizard.hta
- %Boot_Menu%\WizUtility.vbs
- %Boot_Menu%\CustomWizard.xml
- %Boot_Menu%\CustomWizard.vbs
- %Boot_Menu%\[Any other boot menu files you may need]
Modify ZTIMediaHook.wsf
You will now want to modify the ZTIMediaHook.wsf to make sure it is using the correct paths to the Folder structure we setup earlier. Here are the variables of interest.
- · masterShare
- · BootMenuPath
- · WizardFilesPath
- · bootDiskPath
- · MasterScript ' This one in particular is the file that is called to start your Wizard scripts, typically the old ZTIMediahook.
- · logonDomain
- · masterAccount
- · masterPW
Create New Bootdisk
You can now create a new bootdisk and inlcude the ZTIMediahook you modified above. The easiest way to do this is by using the "Create Boot Image Using Microsoft Deployment" task under Boot Disks.
1. Right Click Boot Images node in the SCCM console
2. Select "Create Boot Image using Microsoft Deployment"
3. Package Source Wizard
- · Give the wizard a package source folder
4. General Settings Wizard
- · Provide Name, Version, etc to your boot image
5. Image Options
- · Check "Add media hook files..." option
- · Extra Directory to Add: %Master Share%\bootdisk\additional_files
6. Summary - Click next and finish.
Step 5 above is the most important step as it adds both the execution of ZTIMediahook.wsf into the TSConfig.ini file on the bootdisk as well as copy our modified ZTIMediahook.wsf over the one that exists on the bootdisk.
Boot and Test!
Most likely you'll have to work out some kinks with the variables under the Modify ZTIMediahook.wsf section above or even permissions or paths that may have been missed. You can modify the ZTIMediahook.wsf file directly under the X:\Deploy\Scripts folder using notepad within WinPE and executing again to avoid having to create a new bootdisk again just to test.
Editing MasterMediaHook (Added 02/12/2010)
Todd Miller brought this to my attention and I wanted to share this. If for example you were utilizing the original ZTIMediahook as now your network-based media hook you may need to make some edits to it as well. So if your new script is called NetworkMediaHook.wsf that resides on the share you may need to modify class names inside your script as shown here by Todd:
I had to search the script for all instances of ZTIMediaHook and change it to NetworkMediaHook. .
For example…
'//----------------------------------------------------------------------------
'// Main Class
'//----------------------------------------------------------------------------
Class NetworkMediaHook
Included Files (Updated 02/12/2010)
Download: SetupCustomMediaHook.zip