<s>
VBScript	B-Application
(	O
"	O
Microsoft	O
Visual	B-Application
Basic	I-Application
Scripting	I-Application
Edition	I-Application
"	O
)	O
is	O
an	O
Active	B-Application
Scripting	I-Application
language	O
developed	O
by	O
Microsoft	O
that	O
is	O
modeled	O
on	O
Visual	B-Language
Basic	I-Language
.	O
</s>
<s>
It	O
allows	O
Microsoft	B-Application
Windows	I-Application
system	B-Application
administrators	I-Application
to	O
generate	O
powerful	O
tools	O
for	O
managing	O
computers	O
without	O
error	B-General_Concept
handling	I-General_Concept
and	O
with	O
subroutines	O
and	O
other	O
advanced	O
programming	O
constructs	O
.	O
</s>
<s>
VBScript	B-Application
uses	O
the	O
Component	B-Application
Object	I-Application
Model	I-Application
to	O
access	O
elements	O
of	O
the	O
environment	O
within	O
which	O
it	O
is	O
running	O
;	O
for	O
example	O
,	O
the	O
FileSystemObject	O
(	O
FSO	O
)	O
is	O
used	O
to	O
create	B-General_Concept
,	I-General_Concept
read	I-General_Concept
,	I-General_Concept
update	I-General_Concept
and	I-General_Concept
delete	I-General_Concept
files	B-Operating_System
.	O
</s>
<s>
VBScript	B-Application
has	O
been	O
installed	O
by	O
default	O
in	O
every	O
desktop	O
release	O
of	O
Microsoft	B-Application
Windows	I-Application
since	O
Windows	B-Device
98	I-Device
;	O
in	O
Windows	B-Device
Server	I-Device
since	O
Windows	B-Application
NT	O
4.0	O
Option	O
Pack	O
;	O
and	O
optionally	O
with	O
Windows	B-Operating_System
CE	I-Operating_System
(	O
depending	O
on	O
the	O
device	O
it	O
is	O
installed	O
on	O
)	O
.	O
</s>
<s>
A	O
VBScript	B-Application
script	O
must	O
be	O
executed	O
within	O
a	O
host	O
environment	O
,	O
of	O
which	O
there	O
are	O
several	O
provided	O
with	O
Microsoft	B-Application
Windows	I-Application
,	O
including	O
:	O
Windows	B-Application
Script	O
Host	O
(	O
WSH	O
)	O
,	O
Internet	B-Application
Explorer	I-Application
(	O
IE	O
)	O
,	O
and	O
Internet	B-Application
Information	I-Application
Services	I-Application
(	O
IIS	O
)	O
.	O
</s>
<s>
Additionally	O
,	O
the	O
VBScript	B-Application
hosting	O
environment	O
is	O
embeddable	O
in	O
other	O
programs	O
,	O
through	O
technologies	O
such	O
as	O
the	O
Microsoft	O
Script	O
Control	O
(	O
)	O
.	O
</s>
<s>
VBScript	B-Application
began	O
as	O
part	O
of	O
the	O
Microsoft	B-Application
Windows	I-Application
Script	O
Technologies	O
,	O
launched	O
in	O
1996	O
.	O
</s>
<s>
This	O
technology	O
(	O
which	O
also	O
included	O
JScript	B-Language
)	O
was	O
initially	O
targeted	O
at	O
web	O
developers	O
.	O
</s>
<s>
During	O
a	O
period	O
of	O
just	O
over	O
two	O
years	O
,	O
VBScript	B-Application
advanced	O
from	O
version	O
1.0	O
to	O
2.0	O
,	O
and	O
over	O
that	O
time	O
it	O
gained	O
support	O
from	O
Windows	B-Application
system	B-Application
administrators	I-Application
seeking	O
an	O
automation	O
tool	O
more	O
powerful	O
than	O
the	O
batch	O
language	O
first	O
developed	O
in	O
the	O
early	O
1980s	O
.	O
</s>
<s>
On	O
August	O
1	O
,	O
1996	O
,	O
Internet	B-Application
Explorer	I-Application
was	O
released	O
with	O
features	O
that	O
included	O
VBScript	B-Application
.	O
</s>
<s>
In	O
version	O
5.0	O
,	O
the	O
functionality	O
of	O
VBScript	B-Application
was	O
increased	O
with	O
new	O
features	O
including	O
regular	B-Language
expressions	I-Language
;	O
classes	O
;	O
the	O
With	O
statement	O
;	O
the	O
Eval	O
,	O
Execute	O
,	O
and	O
ExecuteGlobal	O
functions	O
to	O
evaluate	O
and	O
execute	O
script	O
commands	O
built	O
during	O
the	O
execution	O
of	O
another	O
script	O
;	O
a	O
function-pointer	O
system	O
via	O
GetRef	O
,	O
and	O
Distributed	B-Operating_System
COM	I-Operating_System
(	O
DCOM	B-Operating_System
)	O
support	O
.	O
</s>
<s>
In	O
version	O
5.5	O
,	O
SubMatches	O
were	O
added	O
to	O
the	O
regular	B-Language
expression	I-Language
class	O
in	O
VBScript	B-Application
,	O
to	O
finally	O
allow	O
script	O
authors	O
to	O
capture	O
the	O
text	O
within	O
the	O
expression	O
's	O
groups	O
.	O
</s>
<s>
That	O
capability	O
had	O
already	O
been	O
available	O
in	O
JScript	B-Language
.	O
</s>
<s>
With	O
the	O
advent	O
of	O
the	O
.NET	B-Application
Framework	I-Application
,	O
the	O
scripting	O
team	O
took	O
the	O
decision	O
to	O
implement	O
future	O
support	O
for	O
VBScript	B-Application
within	O
ASP.NET	B-Application
for	O
web	O
development	O
,	O
and	O
therefore	O
no	O
new	O
versions	O
of	O
the	O
VBScript	B-Application
engine	O
would	O
be	O
developed	O
.	O
</s>
<s>
For	O
Windows	B-Application
system	B-Application
administrators	I-Application
,	O
Microsoft	O
suggests	O
migrating	O
to	O
Windows	B-Application
PowerShell	I-Application
.	O
</s>
<s>
However	O
,	O
the	O
scripting	O
engine	O
will	O
continue	O
to	O
be	O
shipped	O
with	O
future	O
releases	O
of	O
Microsoft	B-Application
Windows	I-Application
and	O
IIS	O
.	O
</s>
<s>
When	O
employed	O
for	O
client-side	O
web	O
development	O
in	O
Microsoft	B-Application
Internet	I-Application
Explorer	I-Application
,	O
VBScript	B-Application
is	O
similar	O
in	O
function	O
to	O
JavaScript	B-Language
.	O
</s>
<s>
It	O
is	O
used	O
to	O
write	O
executable	O
functions	O
that	O
are	O
embedded	O
in	O
or	O
included	O
from	O
HTML	B-Language
pages	O
and	O
interact	O
with	O
the	O
Document	B-General_Concept
Object	I-General_Concept
Model	I-General_Concept
(	O
DOM	B-General_Concept
)	O
of	O
the	O
page	O
,	O
to	O
perform	O
tasks	O
not	O
possible	O
in	O
HTML	B-Language
alone	O
.	O
</s>
<s>
However	O
,	O
other	O
web	O
browsers	O
such	O
as	O
Firefox	B-Application
and	O
Opera	B-Application
and	O
recently	O
Chrome	B-Application
do	O
not	O
have	O
built-in	O
support	O
for	O
VBScript	B-Application
.	O
</s>
<s>
This	O
means	O
that	O
where	O
client-side	O
scripting	O
and	O
cross-browser	O
compatibility	O
are	O
required	O
,	O
developers	O
usually	O
choose	O
JavaScript	B-Language
over	O
most	O
other	O
programming	O
languages	O
,	O
such	O
as	O
VBScript	B-Application
.	O
</s>
<s>
VBScript	B-Application
is	O
also	O
used	O
for	O
server-side	O
processing	O
of	O
web	O
pages	O
,	O
most	O
notably	O
with	O
Microsoft	O
Active	B-General_Concept
Server	I-General_Concept
Pages	I-General_Concept
(	O
ASP	O
)	O
.	O
</s>
<s>
The	O
ASP	O
engine	O
and	O
type	O
library	O
,	O
,	O
invokes	O
to	O
run	O
VBScript	B-Application
scripts	O
.	O
</s>
<s>
VBScript	B-Application
that	O
is	O
embedded	O
in	O
an	O
ASP	O
page	O
is	O
contained	O
within	O
<% and %>	O
context	O
switches	O
.	O
</s>
<s>
The	O
following	O
example	O
of	O
an	O
ASP	O
page	O
with	O
VBScript	B-Application
displays	O
the	O
current	O
time	O
in	O
24-hour	O
format	O
,	O
but	O
it	O
is	O
also	O
used	O
as	O
the	O
default	O
script	O
for	O
error	O
messages	O
with	O
the	O
Windows	B-Application
operating	I-Application
systems	I-Application
.	O
</s>
<s>
VBScript	B-Application
can	O
also	O
be	O
used	O
to	O
create	O
applications	O
that	O
run	O
directly	O
on	O
a	O
workstation	O
running	O
Microsoft	B-Application
Windows	I-Application
.	O
</s>
<s>
The	O
simplest	O
example	O
is	O
a	O
script	O
that	O
makes	O
use	O
of	O
the	O
Windows	B-Application
Script	O
Host	O
(	O
WSH	O
)	O
environment	O
.	O
</s>
<s>
Such	O
a	O
script	O
is	O
usually	O
in	O
a	O
stand-alone	O
file	O
with	O
the	O
file	O
extension	O
.vbs	B-Language
.	O
</s>
<s>
is	O
used	O
in	O
a	O
command	B-Application
line	I-Application
environment	I-Application
.	O
</s>
<s>
VBScript	B-Application
can	O
be	O
included	O
in	O
two	O
other	O
types	O
of	O
scripting	O
files	B-Operating_System
:	O
Windows	B-Application
Script	O
Files	B-Operating_System
,	O
and	O
HTML	B-Application
Applications	I-Application
.	O
</s>
<s>
A	O
Windows	B-Application
Script	O
File	O
(	O
WSF	O
)	O
is	O
styled	O
after	O
XML	O
.	O
</s>
<s>
A	O
WSF	O
file	O
can	O
include	O
multiple	O
VBS	O
files	B-Operating_System
.	O
</s>
<s>
As	O
a	O
result	O
,	O
WSF	O
files	B-Operating_System
provide	O
a	O
means	O
for	O
code	O
reuse	O
:	O
a	O
library	O
of	O
classes	O
or	O
functions	O
can	O
be	O
stored	O
in	O
one	O
or	O
more	O
.vbs	B-Language
files	B-Operating_System
,	O
which	O
can	O
be	O
included	O
in	O
.wsf	O
files	B-Operating_System
,	O
so	O
the	O
functionality	O
can	O
be	O
reused	O
in	O
a	O
modular	O
way	O
.	O
</s>
<s>
The	O
files	B-Operating_System
have	O
extension	O
.wsf	O
and	O
can	O
be	O
executed	O
using	O
or	O
,	O
just	O
as	O
a	O
.vbs	B-Language
file	O
can	O
.	O
</s>
<s>
An	O
HTML	B-Application
Application	I-Application
(	O
HTA	B-Application
)	O
is	O
styled	O
after	O
HTML	B-Language
.	O
</s>
<s>
The	O
HTML	B-Language
in	O
the	O
file	O
is	O
used	O
to	O
generate	O
the	O
user	O
interface	O
,	O
and	O
a	O
scripting	O
language	O
such	O
as	O
VBScript	B-Application
is	O
used	O
for	O
the	O
program	O
logic	O
.	O
</s>
<s>
The	O
files	B-Operating_System
have	O
extension	O
.	O
</s>
<s>
VBScript	B-Application
(	O
and	O
JScript	B-Language
)	O
can	O
also	O
be	O
used	O
in	O
a	O
Windows	B-Application
Script	O
Component	O
,	O
an	O
ActiveX-enabled	O
script	O
class	O
that	O
can	O
be	O
invoked	O
by	O
other	O
COM-enabled	O
applications	O
.	O
</s>
<s>
These	O
files	B-Operating_System
have	O
extension	O
.	O
</s>
<s>
VBScript	B-Application
is	O
simple	O
to	O
create	O
and	O
can	O
be	O
coded	O
using	O
an	O
easy	O
to	O
use	O
text	O
editor	O
like	O
Notepad	O
.	O
</s>
<s>
A	O
simple	O
VBScript	B-Application
saved	O
by	O
the	O
.vbs	B-Language
extension	O
can	O
be	O
run	O
on	O
a	O
Windows	B-Application
system	O
by	O
double	O
clicking	O
it	O
.	O
</s>
<s>
The	O
language	O
of	O
VBScript	B-Application
is	O
modeled	O
on	O
Visual	B-Language
Basic	I-Language
,	O
and	O
therefore	O
can	O
be	O
reviewed	O
using	O
similar	O
categories	O
:	O
procedures	O
,	O
control	O
structures	O
,	O
constants	O
,	O
variables	O
,	O
user	O
interaction	O
,	O
array	O
handling	O
,	O
date/time	O
functions	O
,	O
error	B-General_Concept
handling	I-General_Concept
,	O
mathematical	O
functions	O
,	O
objects	O
,	O
regular	B-Language
expressions	I-Language
,	O
string	O
manipulation	O
,	O
and	O
so	O
on	O
.	O
</s>
<s>
A	O
"	O
procedure	O
"	O
is	O
the	O
main	O
construct	O
in	O
VBScript	B-Application
for	O
separating	O
code	O
into	O
smaller	O
modules	O
.	O
</s>
<s>
VBScript	B-Application
distinguishes	O
between	O
a	O
function	O
,	O
which	O
can	O
return	O
a	O
result	O
in	O
an	O
assignment	O
statement	O
,	O
and	O
a	O
subroutine	O
,	O
which	O
cannot	O
.	O
</s>
<s>
Variables	O
have	O
"	O
Variant	B-Language
"	O
type	O
by	O
default	O
,	O
but	O
it	O
is	O
possible	O
(	O
and	O
sometimes	O
necessary	O
)	O
to	O
force	O
a	O
particular	O
type	O
(	O
integer	O
,	O
date	O
,	O
etc	O
.	O
)	O
</s>
<s>
For	O
more	O
elaborate	O
GUI	O
interaction	O
with	O
controls	O
,	O
VBScript	B-Application
can	O
be	O
used	O
in	O
combination	O
with	O
HTML	B-Language
,	O
for	O
example	O
,	O
in	O
an	O
HTML	B-Application
Application	I-Application
.	O
</s>
<s>
Event-driven	O
forms	O
are	O
not	O
supported	O
as	O
in	O
Visual	B-Language
Basic	I-Language
or	O
Visual	B-Language
Basic	I-Language
for	I-Language
Applications	I-Language
.	O
</s>
<s>
However	O
,	O
it	O
is	O
considered	O
a	O
best	O
practice	O
of	O
VBScript	B-Application
style	O
to	O
be	O
consistent	O
and	O
to	O
capitalize	O
judiciously	O
.	O
</s>
<s>
When	O
hosted	O
by	O
the	O
Windows	B-Application
Script	O
Host	O
,	O
VBScript	B-Application
provides	O
numerous	O
features	O
which	O
are	O
common	O
to	O
scripting	O
languages	O
,	O
but	O
not	O
available	O
from	O
Visual	B-Language
Basic	I-Language
6.0	I-Language
.	O
</s>
<s>
Named	O
and	O
unnamed	O
command	B-Application
line	I-Application
arguments	O
,	O
</s>
<s>
WSH.ExitCode	O
which	O
can	O
be	O
tested	O
from	O
DOS	O
batch	O
files	B-Operating_System
,	O
or	O
by	O
the	O
process	O
which	O
invoked	O
the	O
script	O
file	O
,	O
</s>
<s>
Functionality	O
for	O
embedding	O
a	O
VBScript	B-Application
engine	O
in	O
other	O
applications	O
,	O
using	O
a	O
widely	O
known	O
language	O
.	O
</s>
<s>
CScript	O
,	O
the	O
command	B-Application
line	I-Application
runner	O
,	O
provides	O
options	O
for	O
:	O
</s>
<s>
Invoking	O
Debug	O
Mode	O
from	O
the	O
command	B-Application
line	I-Application
,	O
</s>
<s>
Error	B-General_Concept
reporting	I-General_Concept
including	O
the	O
line	O
number	O
.	O
</s>
<s>
This	O
provides	O
objects	O
such	O
as	O
FileSystemObject	O
,	O
File	O
,	O
and	O
TextStream	O
,	O
which	O
expose	O
the	O
Windows	B-Application
file	O
system	O
to	O
the	O
programmer	O
.	O
</s>
<s>
Database	O
access	O
is	O
made	O
possible	O
through	O
ActiveX	B-Library
Data	I-Library
Objects	I-Library
(	O
ADO	O
)	O
,	O
and	O
the	O
IIS	B-General_Concept
Metabase	I-General_Concept
can	O
be	O
manipulated	O
using	O
the	O
GetObject( )	O
function	O
with	O
sufficient	O
permissions	O
(	O
useful	O
for	O
creating	O
and	O
destroying	O
sites	O
and	O
virtual	O
directories	O
)	O
.	O
</s>
<s>
XML	O
files	B-Operating_System
and	O
schemas	O
can	O
be	O
manipulated	O
with	O
the	O
Microsoft	B-Application
XML	I-Application
Library	I-Application
Application	B-Application
Programming	I-Application
Interfaces	I-Application
(	O
,	O
)	O
,	O
which	O
also	O
can	O
be	O
used	O
to	O
retrieve	O
content	O
from	O
the	O
World	O
Wide	O
Web	O
via	O
the	O
XMLHTTP	O
and	O
ServerXMLHTTP	O
objects	O
(	O
class	O
strings	O
"	O
MSXML2.XMLHTTP.6.0	O
"	O
and	O
"	O
MSXML2.ServerXMLHTTP.6.0	O
"	O
,	O
respectively	O
)	O
.	O
</s>
<s>
Security	O
concerns	O
have	O
led	O
to	O
many	O
ActiveX	O
controls	O
being	O
blacklisted	O
in	O
the	O
Internet	B-Application
Explorer	I-Application
process	O
by	O
Microsoft	O
,	O
which	O
deploys	O
the	O
killbit	B-Application
via	O
monthly	O
Windows	B-Application
security	O
updates	O
to	O
disable	O
vulnerable	O
Microsoft	O
and	O
third	O
party	O
code	O
.	O
</s>
<s>
Programmers	O
can	O
utilize	O
the	O
extensibility	O
via	O
COM	B-Application
(	O
ActiveX	O
)	O
modules	O
to	O
specifically	O
equip	O
the	O
Script	O
Host	O
and	O
VBScript	B-Application
with	O
required	O
or	O
desired	O
functions	O
.	O
</s>
<s>
The	O
"	O
VTool	O
"	O
component	O
,	O
for	O
instance	O
,	O
adds	O
a	O
number	O
of	O
dialog	O
windows	B-Application
,	O
binary	O
file	O
access	O
,	O
and	O
other	O
functionality	O
.	O
</s>
<s>
Microsoft	O
does	O
not	O
routinely	O
make	O
available	O
an	O
IDE	O
(	O
Integrated	B-Application
Development	I-Application
Environment	I-Application
)	O
for	O
VBScript	B-Application
,	O
although	O
the	O
Microsoft	B-Operating_System
Script	I-Operating_System
Editor	I-Operating_System
has	O
been	O
bundled	O
with	O
certain	O
versions	O
of	O
Microsoft	O
Office	O
.	O
</s>
<s>
For	O
debugging	O
purposes	O
the	O
Microsoft	O
Script	O
Debugger	O
can	O
still	O
be	O
used	O
in	O
current	O
Windows	B-Application
versions	O
,	O
even	O
though	O
the	O
tool	O
has	O
not	O
been	O
updated	O
in	O
years	O
.	O
</s>
<s>
It	O
allows	O
the	O
user	O
to	O
set	O
break	O
points	O
in	O
the	O
VBScript	B-Application
code	O
but	O
the	O
user	O
interface	O
is	O
more	O
than	O
clumsy	O
.	O
</s>
<s>
There	O
are	O
VBScript	B-Application
debuggers	O
available	O
from	O
third-party	O
sources	O
,	O
and	O
many	O
text	B-Application
editors	I-Application
offer	O
syntax	O
highlighting	O
for	O
the	O
language	O
.	O
</s>
<s>
Although	O
VBScript	B-Application
is	O
a	O
general-purpose	O
scripting	O
language	O
,	O
several	O
particular	O
areas	O
of	O
use	O
are	O
noteworthy	O
.	O
</s>
<s>
First	O
,	O
it	O
used	O
to	O
be	O
widely	O
used	O
among	O
system	B-Application
administrators	I-Application
in	O
the	O
Microsoft	O
environment.	O
,	O
but	O
it	O
has	O
since	O
been	O
vastly	O
surpassed	O
by	O
PowerShell	B-Application
.	O
</s>
<s>
Second	O
,	O
VBScript	B-Application
is	O
the	O
scripting	O
language	O
for	O
Micro	B-Application
Focus	I-Application
Unified	I-Application
Functional	I-Application
Testing	I-Application
,	O
a	O
test	O
automation	O
tool	O
.	O
</s>
<s>
A	O
third	O
area	O
to	O
note	O
is	O
the	O
adoption	O
of	O
VBScript	B-Application
as	O
the	O
internal	O
scripting	O
language	O
for	O
some	O
embedded	O
applications	O
,	O
such	O
as	O
industrial	O
operator	O
interfaces	O
and	O
human	O
machine	O
interfaces	O
.	O
</s>
<s>
The	O
hierarchical	O
DBMS	O
InterSystems	B-Language
Caché	I-Language
(	O
which	O
has	O
its	O
roots	O
in	O
the	O
language	O
MUMPS	B-Language
)	O
also	O
supports	O
an	O
implementation	O
of	O
VBScript	B-Application
,	O
Cache	B-Language
BASIC	O
,	O
for	O
programming	O
stored	O
code	O
.	O
</s>
<s>
VBScript	B-Application
omits	O
several	O
useful	O
features	O
of	O
the	O
full	O
Visual	B-Language
Basic	I-Language
,	O
such	O
as	O
strong	O
typing	O
,	O
extended	O
error	B-General_Concept
trapping	I-General_Concept
and	O
the	O
ability	O
to	O
pass	O
a	O
variable	O
number	O
of	O
parameters	O
to	O
a	O
subroutine	O
.	O
</s>
<s>
However	O
,	O
its	O
use	O
is	O
relatively	O
widespread	O
because	O
it	O
is	O
easy	O
to	O
learn	O
and	O
because	O
those	O
who	O
implement	O
code	O
in	O
the	O
language	O
need	O
not	O
pay	O
royalties	O
to	O
Microsoft	O
as	O
long	O
as	O
the	O
VBScript	B-Application
trade	O
mark	O
is	O
acknowledged	O
.	O
</s>
<s>
When	O
an	O
organization	O
licenses	O
Visual	B-Language
Basic	I-Language
for	I-Language
Applications	I-Language
(	O
VBA	B-Language
)	O
from	O
Microsoft	O
,	O
as	O
companies	O
such	O
as	O
Autodesk	O
,	O
StatSoft	O
,	O
Great	O
Plains	O
Accounting	O
and	O
Visio	O
(	O
subsequently	O
acquired	O
by	O
Microsoft	O
)	O
have	O
done	O
,	O
it	O
is	O
allowed	O
to	O
redistribute	O
the	O
full	O
VBA	B-Language
code-writing	O
and	O
debugging	O
environment	O
with	O
its	O
product	O
.	O
</s>
<s>
VBScript	B-Application
is	O
used	O
in	O
place	O
of	O
VBA	B-Language
as	O
the	O
macro	O
language	O
of	O
Outlook	O
97	O
.	O
</s>
<s>
VBScript	B-Application
can	O
be	O
effectively	O
used	O
for	O
automating	O
day	O
to	O
day	O
office	O
tasks	O
as	O
well	O
as	O
monitoring	O
in	O
the	O
Windows-based	O
environment	O
.	O
</s>
<s>
It	O
can	O
also	O
be	O
used	O
in	O
collaboration	O
with	O
ADODB	O
ActiveX	B-Library
Data	I-Library
Objects	I-Library
(	O
ADODB	O
)	O
for	O
effective	O
database	O
connectivity	O
.	O
</s>
<s>
VBScript	B-Application
can	O
also	O
be	O
used	O
to	O
create	O
malware	O
and	O
viruses	O
,	O
such	O
as	O
the	O
ILOVEYOU	O
worm	O
that	O
spread	O
through	O
email	O
attachment	O
in	O
Outlook	O
97	O
that	O
cost	O
billions	O
of	O
dollars	O
.	O
</s>
