What is the difference between WSH, VBScript and WMI (and ADSI) ?

M

Marcus Mender

As far as I understand it there a couple of scripting techniques built-in in Win2000 and WinXP:

- WSH,
- VBScript
- WMI
and
- ADSI

What is the difference between them ?

Are they all available for WinME as well?

Marcus
 
G

Guest

Marcus said:
As far as I understand it there a couple of scripting techniques built-in in Win2000 and WinXP:

- WSH,
- VBScript
- WMI
and
- ADSI

What is the difference between them ?

Are they all available for WinME as well?

Marcus

WSH is a service that manages the execution of scripts written in a
number of scripting languages. VBScript is a scripting language. WMI
and ADSI are interfaces/extensions that cannot do anything by
themselves but can be used by scripting languages (and other
programming tools) to add additional functionality.

So, you write your script in VBScript, use WMI or ADSI to provide
functions that VBScript does not natively support and then run the
script within WSH.
 
W

Wesley Vogel

Are they all available for WinME as well?

Wscript.exe, cscript.exe and WSH are.

WMI networking methods are only supported on Windows NT-based platforms,
including Windows 2000 and Windows XP.
Network-Related WMI Methods Fail on Windows 95, Windows 98, Windows Me
http://support.microsoft.com/kb/272989

However,

Windows Management Instrumentation (WMI) CORE 1.5 (Windows 95/98)
Brief Description
Windows Management Instrumentation (WMI) makes Windows extremely manageable
using a single consistent, standards-based, extensible and object-orientated
interface.
Software Requirements:
Microsoft® Internet Explorer version 5 or later
Operating System: Windows 95, 98, 98SE
http://www.microsoft.com/downloads/...ba-337b-4e92-8c18-a63847760ea5&DisplayLang=en

ADSI will apparently work back to Windows 95.

If you use Microsoft Windows 95, you are required to use Microsoft Internet
Explorer 4.0 or later with WSH and ADSI installed.
How to Remove Multiple Expired User Accounts from Windows NT
http://support.microsoft.com/kb/251334

Type WSH in the Search box in Help and Support.

<quote>
Windows Script Host supports scripts that are written in Visual Basic
Scripting Edition (VBScript) or JScript.
<quote>

<quote>
The first time people encounter Windows Script Host (WSH), they often
express some confusion. What exactly is WSH? Is it a language, like
VBScript or JScript? No; although WSH enables you to run programs written
in these languages, it is not a language itself. Is it an object model, like
WMI or ADSI? No; WSH does provide a simple object model, but providing an
object model is not its primary purpose.

So then what is WSH? As the name implies, WSH is a script host. A script
host is a program that provides an environment in which users can execute
scripts in a variety of languages, languages that use a variety of object
models to perform tasks.
<quote>

<quote>
There are two versions of the Windows Script Host: a Windows-based version
(Wscript.exe), which provides a property sheet for setting script
properties, and a command-prompt-based version (Cscript.exe), which provides
command-line switches for setting script properties. You can run either of
these by typing Wscript.exe or Cscript.exe at the command prompt.
<quote>

<quote>
Windows XP includes Windows Script Host, a language-independent scripting
host for 32-bit Windows platforms that includes both Visual Basic Scripting
Edition (VBScript; .vbs) and JScript (.js) scripting engines. You can use
Windows Script Host to run .vbs and .js scripts directly on the Windows
desktop or in the command console, without the need to embed these scripts
in an HTML document.
<quote>

<quote>
What Is WMI?
Originally released in 1998 as an add-on component with Windows NT 4.0
Service Pack 4, WMI is the core management-enabling technology built into
Windows 2000, Windows XP, and the Windows Server 2003 family of operating
systems. Based on industry standards overseen by the Distributed Management
Task Force (DMTF), WMI is the instrumentation and plumbing through which
all—well, almost all—Windows resources can be accessed, configured, managed,
and monitored.
<quote>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnclinic/html/scripting06112002.asp

<quote>
Windows Management Instrumentation (WMI)
Windows Management Instrumentation (WMI) is a component of the Microsoft®
Windows® operating system and is the Microsoft implementation of Web-Based
Enterprise Management (WBEM), which is an industry initiative to develop a
standard technology for accessing management information in an enterprise
environment. WMI offers a variety of programming interfaces such as C++,
open database connectivity (ODBC), Microsoft® Visual Basic®, or HTML that
developers can use to customize management applications. System
administrators can use WMI by using scripts to automate administration
tasks. WMI can integrate with Windows components, such as Active Directory®
directory service to allow for a unified management experience.
<quote>

<quote>
Active Directory Service Interfaces
Purpose
Active Directory Service Interfaces (ADSI) is a set of COM interfaces used
to access the features of directory services from different network
providers. ADSI is used in a distributed computing environment to present a
single set of directory service interfaces for managing network resources.
Administrators and developers can use ADSI services to enumerate and manage
the resources in a directory service, no matter which network environment
contains the resource.

ADSI enables common administrative tasks, such as adding new users, managing
printers, and locating resources in a distributed computing environment.
<quote>
http://msdn2.microsoft.com/en-us/library/aa772170.aspx

Active Directory Services Interface (ADSI): Frequently Asked Questions
http://msdn2.microsoft.com/en-us/library/ms808923.aspx

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
J

Jon

I was more than a little surprised to hear the following from "Marcus
Mender said:
As far as I understand it there a couple of scripting techniques built-in
in Win2000 and WinXP:

- WSH,
- VBScript
- WMI
and
- ADSI

What is the difference between them ?

Are they all available for WinME as well?

Marcus


WSH is a host for languages on your machine such as vbscript and jscript.
VBscript itself is a particular programming language that you can use. WMI
and ADSI are specific examples of ways in which you can use a language like
vbscript (within WSH) to retrieve information or do things on your Windows
system.
 
W

Wesley Vogel

MUTIPOSTED IN microsoft.public.windowsxp.general

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
W

Wesley Vogel

MULTIPOSTED IN microsoft.public.windowsxp.help_and_support

Wscript.exe, cscript.exe and WSH are.

WMI networking methods are only supported on Windows NT-based platforms,
including Windows 2000 and Windows XP.
Network-Related WMI Methods Fail on Windows 95, Windows 98, Windows Me
http://support.microsoft.com/kb/272989

However,

Windows Management Instrumentation (WMI) CORE 1.5 (Windows 95/98)
Brief Description
Windows Management Instrumentation (WMI) makes Windows extremely manageable
using a single consistent, standards-based, extensible and object-orientated
interface.
Software Requirements:
Microsoft® Internet Explorer version 5 or later
Operating System: Windows 95, 98, 98SE
http://www.microsoft.com/downloads/...ba-337b-4e92-8c18-a63847760ea5&DisplayLang=en

ADSI will apparently work back to Windows 95.

If you use Microsoft Windows 95, you are required to use Microsoft Internet
Explorer 4.0 or later with WSH and ADSI installed.
How to Remove Multiple Expired User Accounts from Windows NT
http://support.microsoft.com/kb/251334

Type WSH in the Search box in Help and Support.

<quote>
Windows Script Host supports scripts that are written in Visual Basic
Scripting Edition (VBScript) or JScript.
<quote>

<quote>
The first time people encounter Windows Script Host (WSH), they often
express some confusion. What exactly is WSH? Is it a language, like
VBScript or JScript? No; although WSH enables you to run programs written
in these languages, it is not a language itself. Is it an object model, like
WMI or ADSI? No; WSH does provide a simple object model, but providing an
object model is not its primary purpose.

So then what is WSH? As the name implies, WSH is a script host. A script
host is a program that provides an environment in which users can execute
scripts in a variety of languages, languages that use a variety of object
models to perform tasks.
<quote>

<quote>
There are two versions of the Windows Script Host: a Windows-based version
(Wscript.exe), which provides a property sheet for setting script
properties, and a command-prompt-based version (Cscript.exe), which provides
command-line switches for setting script properties. You can run either of
these by typing Wscript.exe or Cscript.exe at the command prompt.
<quote>

<quote>
Windows XP includes Windows Script Host, a language-independent scripting
host for 32-bit Windows platforms that includes both Visual Basic Scripting
Edition (VBScript; .vbs) and JScript (.js) scripting engines. You can use
Windows Script Host to run .vbs and .js scripts directly on the Windows
desktop or in the command console, without the need to embed these scripts
in an HTML document.
<quote>

<quote>
What Is WMI?
Originally released in 1998 as an add-on component with Windows NT 4.0
Service Pack 4, WMI is the core management-enabling technology built into
Windows 2000, Windows XP, and the Windows Server 2003 family of operating
systems. Based on industry standards overseen by the Distributed Management
Task Force (DMTF), WMI is the instrumentation and plumbing through which
all—well, almost all—Windows resources can be accessed, configured, managed,
and monitored.
<quote>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnclinic/html/scripting06112002.asp

<quote>
Windows Management Instrumentation (WMI)
Windows Management Instrumentation (WMI) is a component of the Microsoft®
Windows® operating system and is the Microsoft implementation of Web-Based
Enterprise Management (WBEM), which is an industry initiative to develop a
standard technology for accessing management information in an enterprise
environment. WMI offers a variety of programming interfaces such as C++,
open database connectivity (ODBC), Microsoft® Visual Basic®, or HTML that
developers can use to customize management applications. System
administrators can use WMI by using scripts to automate administration
tasks. WMI can integrate with Windows components, such as Active Directory®
directory service to allow for a unified management experience.
<quote>

<quote>
Active Directory Service Interfaces
Purpose
Active Directory Service Interfaces (ADSI) is a set of COM interfaces used
to access the features of directory services from different network
providers. ADSI is used in a distributed computing environment to present a
single set of directory service interfaces for managing network resources.
Administrators and developers can use ADSI services to enumerate and manage
the resources in a directory service, no matter which network environment
contains the resource.

ADSI enables common administrative tasks, such as adding new users, managing
printers, and locating resources in a distributed computing environment.
<quote>
http://msdn2.microsoft.com/en-us/library/aa772170.aspx

Active Directory Services Interface (ADSI): Frequently Asked Questions
http://msdn2.microsoft.com/en-us/library/ms808923.aspx

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top