共用方式為


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

Comments

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    Hi A, Do you have any error messages in the logs? Thanks, Ben

  • Anonymous
    January 01, 2003
    Hi Jacob, You are correct. I don't know how I let that one slip through. I have now updated the script. Thanks, Ben

  • Anonymous
    January 01, 2003
    I am often asked how I install and configure BDD 2007. So I thought now was a good time to detail at

  • Anonymous
    January 01, 2003
    Hi Paul, This script should work for both ZTI and LTI. Can you send me a copy of your script? my email is - ben dot hunter at microsoft dot com. Thanks, Ben

  • Anonymous
    September 26, 2007
    Hi!. I have some problem with the Secuirty in the database, the zti installer account needs some write rights to the settings and computeridentity table?

  • Anonymous
    October 15, 2007
    I am trying to update the BDD database with asset tag when entered in from the initial deployment wizard. I have edited the DeployWiz_Definition_ENU.xml file so it appears and I can enter the test in, how ever I am having problems creating a new computer record and inserting the asset tag field into the database. I have tried to use the above files and modify them for my implementation but it isn't working. Is this because it is meant to be used with zero touch? Can you please give me some suggestions of where to go from here? Thanks, Paul

  • Anonymous
    November 07, 2007
    The comment has been removed

  • Anonymous
    January 28, 2008
    Hi Ben! I tried your script in my LTI test environment and for some reason, it doesn't work! I'm getting the computer name wizard prompt but it never updates the database with the name I entered. I've also checked the that name and database are correct in the userexit.vbs. All files are there in Winpe 2.0 Is there anything else I should do? Regards /A