欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Windows 腳本宿主  

<named> 元素

對腳本的命名參數(shù)進行說明。

<named
   name = namedname
   helpstring = helpstring
   type = "string|boolean|simple"
   required = boolean
/>

參數(shù)

name
表示要說明的參數(shù)名的字符串。在命令行和腳本中定義參數(shù)。
helpstring
表示有關(guān)參數(shù)幫助說明的字符串。WSH 運行時使用 ShowUsage 方法或 /? 參數(shù)提供幫助說明。
type
可選。對參數(shù)的類型進行說明,參數(shù)的類型定義如何從命令行分析參數(shù)。默認值為 simple。
required
可選。指明某個參數(shù)是否必需的布爾值。只影響用法的顯示。

說明

"<named>" 元素是用一對 runtime 標記括起來的。

名為 server 的參數(shù)在命令行提供一個 /server 參數(shù),在 WSHNamed 參數(shù)集中提供名為 server 的參數(shù)。

如果類型為 string,則參數(shù)為字符串。該參數(shù)以 /named:stringvalue 的形式傳遞給腳本。

如果類型為 Boolean,則參數(shù)為布爾值。該參數(shù)以 /named+ 的形式傳遞給腳本以開啟它,或者以 /named- 的形式傳遞給腳本以關(guān)閉它。

如果類型為 simple,則該參數(shù)不采用其他值,而只以名稱 /named 的形式傳遞。

示例

下面的腳本將演示 <named> 元素的用法:

<job>
<runtime>
<named
name="server"
helpstring="Server to access"
type="string"
required="true"
  />
<named
name="user"
helpstring="User account to use on server.Default is current account."
type="string"
required="false"
  />
<named
name="enable"
helpstring="If true (+), enables the action.A minus(-) disables."
type="boolean"
required="true"
  />
<named
name="verbose"
helpstring="If specified, output will be verbose."
type="boolean"
required="false"
  />
</runtime>
<script language="JScript">
WScript.Arguments.ShowUsage();
</script>
</job>

This will produce the following output when usage is shown:

Usage:example.wsf /server:value [/user:value] /enable[+|-] [/verbose]

Options:

server    :Server to access
user      :User account to use on server.Default is current account.
enable    :If true (+), enables the action.A minus(-) disables.
verbose   :If specified, output will be verbose.

請參閱

ShowUsage 方法 | <runtime> 元素 | <unnamed> 元素 | <description> 元素 | <example> 元素