If...Then...ElseIf

If...Then...ElseIf adds some flexibility to your ability to make decisions by using VBScript. If...Then allows you to evaluate one condition and take action based on that condition. By adding ElseIf to the mixture, you can make multiple decisions. You do this in the same way you did it using the If...Then command. You start out with an If...Then on the first line in the Worker information section, and when you are finished, you end the If...Then section with End If. If you need to make additional evaluations, add a line with ElseIf and the condition.

Get Microsoft® Windows® Scripting Self-Paced Learning Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.