• Welcome to Theos PowerBasic Museum 2017.

IWshEnvironment.Remove Method

Started by José Roca, July 14, 2008, 10:36:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

José Roca



The following code illustrates the use of the Remove method:


#INCLUDE "WSHOM.INC"

LOCAL pWsh AS IWshShell
LOCAL pWshEnv AS IWshEnvironment
LOCAL vType AS VARIANT

pWsh = NEWCOM "WScript.Shell"
' Get a reference to environment collection
vType = "PROCESS"
pWshEnv = pWsh.Environment(vType)
pWshEnv.Item(UCODE$("TestVar")) = UCODE$("Windows Script Host")
pWsh.Remove UCODE$("TestVar")