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

Windows 腳本宿主  

Remove 方法

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

object.Remove(strName) 

參數(shù)

object
WshEnvironment 對(duì)象。
strName
表示要?jiǎng)h除的環(huán)境變量名的字符串值。

說(shuō)明

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

示例

下面的代碼刪除 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%'"));

請(qǐng)參閱

WshEnvironment 對(duì)象 | Environment 屬性