Login | |
|
 |
RE: if statement within for loop - 4/12/2006 2:07:28 AM
|
|
 |
|
| |
ebgreen
Posts: 5070
Score: 31
Joined: 7/12/2005
Status: online
|
If I understand your situation correctly, then try this to see if it does what you want: function checkSubnet() ip = GetIPAddress iparray = Split(ip, ".") iparray(3)="0" subnet = join(iparray,".") objWshShell.Popup subnet ' Now loop through the subnets and see if the logon script should run bIsAllowed = False For Each objItem in allowedSubnets If subnet = allowedSubnets Then bIsAllowed = True End If Next If Not bIsAllowed Then objWshShell.Popup "You are not permitted to map drives from this network" End If end function
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|