When people logon at work, I need to see what machine name it is and then do or don't run a scan base on the computer name. My real problem is that I need to check for a varity of varibles in the computer name...
Each computer is named for its location and then its function at that location: S0100N01. The first four numbers changer per location and of course the last three characters, both the letter and the two numbers change.
I know what I don't want to scan for, so everything else I do. the problem is the variables
Example:
Locations 0002 - 0598 with:
S01
R01
V01
H01 - H10
N01 - N24
I don't want to scan, but any thing at location 0800 I want to scan. And lastly, nothing at location 0900 should be scanned.
I'm looking at having to write something like:
code:
If NOT (InStr(@WKSTA,'0002') AND InStr(@WKSTA,'S01')) OR InStr(@WKSTA,'0900')
OR (InStr(@WKSTA,'0425') AND InStr(@WKSTA,'R01'))
but with all the variables in there, which will make a very long line....
Is there a better way of doing this, or am I going to need to write out this line for every combination? and can that even be done?
[ 25. February 2003, 18:11: Message edited by: ArchAngel96 ]
_________________________
penny = the target
the playing field = three football fields side by side
you = only allowed to stand on the outside of the playing field
tool you get to use to find the penny = a ONE INCH LAWN DART
get the level of difficulty?