共用方式為


Types of Script Files

Stand-alone scripts come in several varieties, and each has its own extension. The following table is a list of some common types.

Common Script Types

Extension

Script Type

Description

.bat

MS-DOS batch file

MS-DOS operating system batch file

.asp

ASP page

Active Server Page file

.html

HTML file

Web page

.js

JScript file

Windows script

.vbs

VBScript file

Windows script

.wsf

Windows Script Host file

Container or project file for a Windows script; supported by WSH 2.0 and later.

.wsh

Windows Script Host files

Property file for a script file; supported by WSH 1.0 and later.

Each script type is suited to different application needs, and each has strengths and weaknesses. The script type you choose depends on your needs.

Still, there are certain scenarios where you could divide your overall problem into several smaller parts, writing a separate script for each part with each script written in the most suitable scripting language.

This is where Windows Script Host files (WSF files) are useful. WSF files may include other script files as part of the script. Consequently, multiple WSF files can reference libraries of useful functions, which may be created and stored in a single place.

See Also

Concepts

Windows Script Host Object Model