Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

How to Change Task Boot Options on a Large Scale

Updated: 18 Sep 2009
FalconV's picture
+2 2 Votes
Login to vote

I've found a need to change all jobs set to boot to a specific boot option to change it to boot to another. For example, I might have 80% of my jobs set to boot to DOS Managed, but now that DOS has celebrated nearly 30 birthdays decided to make the move to WinPE Managed. To go through each task one-by-one would take a LONG time.

Method

The best way to do this is by using a SQL Query. I'll give a few queries in this article, each with their own purpose.  In the examples I'll use 129 (aka DOS Managed) as the old boot option I'd like to change, and 131 (aka WinPE Managed) as the new boot option I'd like to change to.  If you'd like to change to or from Default Automation, use 1.

The first is simplest by-far, but requires a little (less than 30 seconds) legwork... well, fingerwork.  You'll need to know the number of the boot option you'd like changed, and the number of the boot option you'd like them to change to. To find this we'll use the PXE Configuration Utility. Select the boot option you'd like changed, click Edit, and write down the three-digit number at the end of the Final Location on PXE Server.
menuoptionnumber.PNG
Then do the same with the boot option you'd like to change to.  Once you have both numbers, put them in the following query:

/* First, if eXpress isn't the name of the database make sure to change this to reflect the correct name of the database */
USE eXpress
/* Change 131 to the boot option you'd like the tasks to change TO */
UPDATE task SET bootoption_id = '131'
/* Change 129 to the boot option you'd like the tasks to change FROM */
WHERE bootoption_id = '129';

The rest of these will find out the bootoption_id for you. Second up is to change from one boot option to another (Default Automation will not work because it doesn't exist in the boot_options table)

/* First, if eXpress isn't the name of the database make sure to change this to reflect the correct name of the database */
USE eXpress
DECLARE @OLDPXENAME AS VARCHAR(30)
DECLARE @NEWPXENAME AS VARCHAR(30)
/* Change the values below to the old and new PXE Menu Option names */
SET @OLDPXENAME = 'DOS Managed'
SET @NEWPXENAME = 'WinPE Managed'
UPDATE task SET bootoption_id = (SELECT bootoption_id FROM boot_options WHERE pxe_description = @NEWPXENAME)
WHERE bootoption_id = (SELECT bootoption_id FROM boot_options WHERE pxe_description = @OLDPXENAME);

If you're changing to or from Default Automation, you'd need to replace a bunch of the script with '1' because as stated before, Default Automation doesn't exist in the boot_options table.

Changing from Default Automation to a specific boot option:

/* First, if eXpress isn't the name of the database make sure to change this to reflect the correct name of the database */
USE eXpress
DECLARE @PXENAME AS VARCHAR(30)
/* Change the value below to the PXE Menu Option name */
SET @PXENAME = 'WinPE Managed'
UPDATE task SET bootoption_id = (SELECT bootoption_id FROM boot_options WHERE pxe_description = @PXENAME)
WHERE bootoption_id = '1';

Changing from a specific boot option to Default Automation:

/* First, if eXpress isn't the name of the database make sure to change this to reflect the correct name of the database */
USE eXpress
DECLARE @PXENAME AS VARCHAR(30)
/* Change the value below to the PXE Menu Option name */
SET @PXENAME = 'DOS Managed'
UPDATE task SET bootoption_id = '1'
WHERE bootoption_id = (SELECT bootoption_id FROM boot_options WHERE pxe_description = @PXENAME);

These scripts will go through the tasks table on the Deployment Server's database, and for each task that's configured to use the specified boot option, it will change it to the newly specified boot option. This method will save time, and be accurate.  Make sure you understand what you're doing when using these scripts.  For one example, you wouldn't want to globally change all tasks that currently use Linux to use WinPE (or vice-versa), because Linux and Windows use different syntaxes.  Changing from DOS to Windows in most situations will work just fine.  Moving to or from Linux however will require a lot more work, and it may be best to just create a new set of tasks designed for Linux or Windows.  It might be possible to script out such a migration, but that's an article for another day.