Author Topic: IWshEnvironment.Remove Method  (Read 3108 times)

0 Members and 1 Guest are viewing this topic.

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2517
  • User-Rate: +209/-0
  • Gender: Male
IWshEnvironment.Remove Method
« on: July 14, 2008, 10:36:33 PM »

The following code illustrates the use of the Remove method:

Code: [Select]
#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")
« Last Edit: July 14, 2008, 10:40:45 PM by José Roca »