Quote:

Why I should need subnet about this situation?



Using INSTR() on the IP address without breaking it into octets is not very accurate. The occurance of "5" could happen 48 times (0-254) in any octet and since you preclude only two others, it's more like 96 times! Also the "192" and "168" could occur in any of the four octets! With that sort of inaccuracy, what is the point of even checking?

If this is a workgroup and the scripts are local to every machine, what is the point of checking at all? It certainly is not any kind of security except perhaps security by ignorance.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.