Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Condition to check for pre-OS or production?

Created: 01 Feb 2013 | 3 comments

Are there built in Task condition to run it based on which environment the machine is in like the DS 6.x?

Comments 3 CommentsJump to latest comment

mclemson's picture

No.  In general, the tasks will run in the environment you've placed the computer in.  So your job might have four tasks: Reboot to WinPE, Run Script, Run Script, Run Script, Reboot to production, Update configuration, Quick Delivery.  This might reboot the computer to WinPE over PXE, run a format drive script, copy model specific drivers using a WMI call, install Windows 7 using an included unattend.xml, reboot to production Windows, update the configuration (so that you're sure the agent has checked in), and then install antivirus using a Quick Delivery task.

If you had skipped the Reboot to WinPE task at the beginning of your job, then those same scripts (and everything subsequent) would have run in production Windows.  You could create a script to check for WinPE vs. production OS, providing a return code from each.  You can then create Conditions in the job so that a return code of 123 (WinPE) might send you one way (to perform those automation tasks), while a return code of 4567 might send you another (you might define 4567 as a failure code and then fail the job as a result of this task failing).

Mike Clemson, Senior Systems Engineer, ASC
Intuitive Technology Group -- Symantec Platinum Partner
intuitivetech.com

mclemson's picture

In 6.9, if you wanted four tasks to run in automation, you told them to run in automation and they did.  In 7.1 if you have the same situation, you tell the computer to boot to WinPE, run four tasks, then reboot to production.  Having to build this sort of "task sandwich" is annoying but it doesn't need to be made too complex.

If you want to prevent a task from ever running in production instead of WinPE, yes, you'll need to use conditions or scripts to check to be sure you're in the correct OS.  You can reuse the tasks and scripts again and again in 7.1 (as opposed to having to clone or copy tasks in 6.9).

Mike Clemson, Senior Systems Engineer, ASC
Intuitive Technology Group -- Symantec Platinum Partner
intuitivetech.com