I was wondering if anyone could tell me how to do this. I cna't figure it out and was looking for a bit of advice: what i want to do is take the first two characteres of a computername and use that as the indicator of which way the script shoul flow. for instance if i use one type of name for desktop pc's and one type of name for laptop pc's, i want to be able to determine the name and then script to act appropriately:
Desktop example name: dt1234
laptop example name: lt1234
Here is a sample of what i have so far:
set objshell = createobject("wscript.shell")
set objnet = Createobject("wscript.network")
wscript.echo objnet.computername
if computername = "lt*" then
wscript.echo "works"
else
wscript.echo "does not work"
end if
basically what i think i am trying to do is to parse out the results of the objnet.computername results to a partial string??
Any help greatly appreciated
Desktop example name: dt1234
laptop example name: lt1234
Here is a sample of what i have so far:
set objshell = createobject("wscript.shell")
set objnet = Createobject("wscript.network")
wscript.echo objnet.computername
if computername = "lt*" then
wscript.echo "works"
else
wscript.echo "does not work"
end if
basically what i think i am trying to do is to parse out the results of the objnet.computername results to a partial string??
Any help greatly appreciated