BDD 2007 - How to Prompt for information then update the database

I have previously published posts detailing how you can perform bulk updates to the database and how you can use the LTI wizard to prompt for information in ZTI deployments. Now I think it's about time I show you how to combine these two features and populate the database with the information gathered by the wizard.

This process can be very useful when you are trying to build a client that is not in the database. Generally the build process starts and a database lookup is performed to determine the settings, but there are no settings in the database so the build fails. This is not always the best situation and you may not want to manually update the database every time you need to build a computer.

So with this in mind I have created the solution detailed in the flowchart below:

        image

The following steps detail how to implement this process.

Copy files to the ZTI$ share

First we must copy the following files to the deployment point. I have included a sample Custom_Wizard_Definition_ENU.xmlfile in the attached ZIP file.

  • BackButton.JPG
  • Custom_Wizard_Definition_ENU.xml
  • DeployWiz_Initialization.vbs
  • DeployWiz_Validation.vbs
  • Wizard.css
  • Wizard.hta
  • Wizard.ico
  • WizUtility.vbs

Update the deployment point

Next we must update the deployment point bootstrap.ini file. I have included a sample bootstrap.ini and UserExit.vbs files in the attached zip file.

To update files on the deployment point, complete the following steps:

  1. Add the CheckDatabase value to the properties line of the deployment point bootstrap.ini file:

Properties=CheckDatabase

  2. Add the following lines to the [Default] section of the deployment point bootstrap.ini file:

CheckDatabase=#CheckDB#

UserExit=UserExit.vbs

OSDInstallProgram=Install

  3. If no user exit file currently exists, copy the userexit.vbs file to the ZTI folder.

  4. Copy the CheckDB function from the userexit.vbs file provided to the current file.

  5. Replace the <DB SERVER> value in the userexit.vbs file with the name of the server hosting the BDD 2007 database (for example, Data Source=MyDBServer).

Update the Custom_Wizard_Definition_ENU.xml File

The Custom_Wizard_Definition_ENU.xml contains the control information for the wizard. You must customize this file to meet your requirements. The sample file included in the attached file will only prompt for the computer name, but this can easily be updated to include other information such as roles or OU information.

So I hope this helps, it may not be used by everyone but there are certainly times when you will find this process invaluable. 

For more detailed information about updating the database please refer to this post.

For more detailed information about using the LTI wizard with ZTI please refer to this post.

Note: These scripts are set up to use the MAC address as a unique key to store information in the database. You can easily update the scripts to use other values, such as a serial number or asset tag, if required.

Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the Terms of Use .

DBUpdate.zip