compare="hi!" search="hi" pos=InStr(compare,search) if pos > 0 then wscript.echo "found" if pos = 0 then wscript.echo "not found"