Can you skip a task if a task sequence was started from a mandatory assignment?
Say for example you have a task sequence to rebuild a PC. If you started this task sequence from the Run Advertised programs you want it to should show a program (vbs script) first that tells you if you continue its going to wipe all data on your hdd if you press the OK button. I already have this solution in place.. but the problem is If I assign this task sequence as madatory the program will appear and wait for the user to press OK when I don't want it to. Basically I need this program to exit(0) if it detects the task sequence was run from a mandatory assignment. surely there is some hook or part of a TS variable that I could look at to see if the the task sequence was run from a mandatory assignment and then exit(0) can anyone help me with this?
March 18th, 2011 12:52pm

You can check _SMSTSUserStarted. From http://technet.microsoft.com/en-us/library/bb632442.aspx: Specifies whether a task sequence is started by a user. This variable will only be set if the task sequence is started from the Configuration Manager 2007 client. For example, if _SMSTSLaunchMode is set to SMS. The variable can have the following values: true - specifies that the task sequence is manually started by a user from the client Run Advertised Programs program. false - specifies that the task sequence is initiated automatically by the Configuration Manager 2007 scheduler. 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
March 18th, 2011 3:30pm

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

Other recent topics Other recent topics