hi,
I have the following code which asks user a question and gets response. I
need to check response for validity but the following if statement is always
evaluated as true even when correct response is entered:
wscript.stdout.write "What is the SOURCE file type? (user/computer/group): "
strSourceFileType = trim(ucase(wscript.stdin.readline))
if strSourceFileType <> "user" or strSourceFileType <> "computer" or
strSourceFileType <> "group" then
err.raise 449
ErrHandler
end if
Even when I enter "user" or "computer" or "group" (without quotes) at the
prompt the condition evaluates as true and returns "Microsoft VBScript
runtime error: Argument not optional"
I have witten value of strsourcefiletype to screen and it is populated
correctly with no spaces, etc. as expected by the condition right after it is
read. Now if i simply specify:
if strSourceFileType <> "user" then
without the other two OR conditions and type "user" at the prompt all works
fine. I don't understand why I cannot look for the other values in the field
too. ???
thanks again.