/build/static/layout/Breadcrumb_cap_w.png

Vbscript - Search for word in String

Hi all,

I need to find a word in a string, to see if that string contains a particular word. If it does, then proceed to a particular function

So far I have the following below.

'If (InStr((sTaskSeqName),"Tablets") > 1) then
'tablet stuff

Elseif (inStr((sTaskSeqName),"LAPTOPS") = 1) then
'laptop stuff
Else
'Error message
End if

0 Comments   [ + ] Show comments

Answers (2)

Posted by: aogilmor 14 years ago
9th Degree Black Belt
0
If you're doing what it looks like you're doing, look into the WMI function Chassis_type, I think win32_hardware
Posted by: Thegunner 14 years ago
Second Degree Green Belt
0
Would be good, but I need to use VBscript to do it as the rest of the script is like it.
Just wondering if what I am using will do the job?

Thanks for getting back to me.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ