PDA

View Full Version : Case Statements (W2K)



Bill Beckett
03-14-2003, 11:39 AM
I'm a novice with WSH. The articles here have been helpful in setting up a simple logon script with mapping drives. How do I setup case statements in my logon script. For example, if member of a certain group, map another drive, etc. ???

adamdelves
03-17-2003, 11:09 AM
<pre>
variable = 1

select case variable
case 1:
msgbox 1
case 2:
msgbox 2
case else
msgbox "No number was entered"
wscript.quit
end select
</pre>

NB: There is no break statement after each case. After one condition is met the select is exited.