Evaluating exit code within a task sequence
Can I evalute the exit codes for individual task from within my Task Sequence? I have a task sequence that uninstalls the old version of an application, reboots, and then installs the new version. That works great. However, now I need to the boost the registry size limit to its maximum allowed value and reboot before I do any of that. I've written a script that does that. It returns 0 if the value was already set to the max value, and 3010 if it had to be changed. I'd like to reboot if the script returned 3010, but NOT if it returns 0. If it returns anything else, I want the task sequence to cease executing.
February 26th, 2011 7:18am

You can use the built-in (read-only) task sequence variable _SMSTSLastActionRetCode as a condition for your reboot task. This following description for this variable is from the TechNet Docs: "Stores the return code returned by the last action that was run." Jason | http://myitforum.com/cs2/blogs/jsandys | http://blogs.catapultsystems.com/jsandys/default.aspx | Twitter @JasonSandys
Free Windows Admin Tool Kit Click here and download it now
February 26th, 2011 8:05am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics