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

Windows 腳本宿主  

Remove 方法

刪除現(xiàn)有的環(huán)境變量。

object.Remove(strName) 

參數(shù)

object
WshEnvironment 對象。
strName
表示要刪除的環(huán)境變量名的字符串值。

說明

Remove 方法從 PROCESS、USER、SYSTEM 和 VOLATILE 四種類型的環(huán)境中刪除環(huán)境變量。用 Remove 方法刪除的環(huán)境變量不會被永久刪除;它們只是從當前的會話中刪除。

示例

下面的代碼刪除 Process 環(huán)境變量 TestVar。

[VBScript]
Dim WshShell, WshEnv
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshEnv = WshShell.Environment("PROCESS")
WshEnv("TestVar") = "Windows Script Host"
WScript.Echo WshShell.ExpandEnvironmentStrings("The value of the test variable is: '%TestVar%'")
WshEnv.Remove "TestVar"
WScript.Echo WshShell.ExpandEnvironmentStrings("The value of the test variable is: '%TestVar%'")
[JScript]
var WshShell = WScript.CreateObject("WScript.Shell");
var WshEnv = WshShell.Environment("PROCESS");
WshEnv("TestVar") = "Windows Script Host";
WScript.Echo(WshShell.ExpandEnvironmentStrings("The value of the test variable is: '%TestVar%'"));
WshEnv.Remove("TestVar");
WScript.Echo(WshShell.ExpandEnvironmentStrings("The value of the test variable is: '%TestVar%'"));

請參閱

WshEnvironment 對象 | Environment 屬性