Exportovať (0) Tlačiť
Rozbaliť všetko
EN
Tento obsah nie je dostupný vo vašom jazyku, k dispozícii je však anglická verzia.

ExpandEnvironmentStrings Method

Returns an environment variable's expanded value.


                      object.ExpandEnvironmentStrings(strString) 

object

WshShell object.

strString

String value indicating the name of the environment variable you want to expand.

The ExpandEnvironmentStrings method expands environment variables defined in the PROCESS environment space only. Environment variable names, which must be enclosed between "%" characters, are not case-sensitive.

The following code expands the Windows Directory environment variable and displays it:

set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Echo "WinDir is " & WshShell.ExpandEnvironmentStrings("%WinDir%")
var WshShell = WScript.CreateObject("WScript.Shell");
WScript.Echo("WinDir is " + WshShell.ExpandEnvironmentStrings("%WinDir%"));

Applies To:

Obsah od komunity

Zobraziť:
© 2014 Microsoft