I am often asked how to setup a custom task sequence that will continue after a reboot.
If you have created a custom task sequence to install a number of applications that includes a reboot then you will know the problem I am taking about. When you do this you will find that the computer will reboot and then return to the logon prompt. The computer does not automatically logon :(. So you logon manually and BDD does not continue, so you have to manually launch the litetouch.wsf script :(. Then FINALLY the script will continue happily, until next next reboot at least.
Well I don't find this very convenient and I bet you don't either. So I have created a script that will setup required components to allow the BDD processes to continue as they would in a normal BDD deployment process.
The script configures three main components:
- Populates the required auto logon keys in the registry
- Populates the MININT folder with the scripts required to launch the script at when the client reboots
- Configures the BDD script to launch at reboot by creating a shortcut to the litetouch.wsf script in the "all users" startup folder
- Configures the correct phase information so that BDD knows what phase it should process
I find this script very useful, hopefully you find this script as useful as I do.
To implement the script follow the steps detailed below:
Update the deployment point rules
The script uses the ADMINPASSWORD property specified using BDD rules to determine the password that should be used for the local administrator account. If this is not correct then you can change the following line from the script to correctly reflect the value you want to use:
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultPassword", oEnvironment.item("AdminPassword"), "REG_SZ"
Update the scripts folder
Next you must add the script to the .\distribution\scripts folder. You will notice that the script names have the prefix "Z-" this is because BDD automatically copies all scripts that start with "Z" from the distribution share to other deployment points when they are updated.
Update the build task sequence
The next thing you do is add the scripts to the build task sequence. I would recommend creating an application for each script that executes a script and then add it to the task sequence as shown below. It is important to note that the "CUSTOM TS - Setup for reboot " task is run before the first reboot is performed.
Update your deployment points
Finally you should update your deployment points to so that these changes are propagated to the correct places.
For more information about custom task sequences then please refer to the following links: