vbscript – WshShell.Environment

**METHOD:** `shell.Environment(scope)`

**Description**
Accède aux variables d’environnement (Process/User/System).

**Syntax**
`shell.Environment(scope)`

**Paramètres**
– `scope` : « PROCESS », « USER » ou « SYSTEM ».

**Retour**
Collection de variables d’environnement.

**Exemples**
« `vb
Dim shell, env
Set shell = CreateObject(« WScript.Shell »)
Set env = shell.Environment(« PROCESS »)
WScript.Echo env(« COMPUTERNAME »)
« `

**Voir aussi**
`WshShell.ExpandEnvironmentStrings`

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *