commandLine Property

Internet Development Index

Retrieves the argument used to launch the HTML Application (HTA).

Syntax

HTMLN/A
Scripting[ sPath = ] HTA:APPLICATION.commandLine

Possible Values

sPathString that specifies the path and arguments used to launch the HTA.

The property is read-only. The property has no default value.

Remarks

The commandLine property returns an empty string when the HTA is launched over the HTTP protocol.

Example

This example shows how to retrieve the commandLine property value.

<HTML>
<HEAD>
<HTA:APPLICATION ID="oHTA"
APPLICATIONNAME="myApp"
>
<SCRIPT>
alert("commandLine    = " + oHTA.commandLine);
</SCRIPT>
</HEAD>
<BODY SCROLL="no">
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

There is no public standard that applies to this property.

Applies To

HTA:APPLICATION

See Also

Introduction to HTML Applications (HTAs)