Author Topic: IWshEnvironment.Item Property  (Read 4653 times)

0 Members and 1 Guest are viewing this topic.

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2512
  • User-Rate: +209/-0
IWshEnvironment.Item Property
« on: July 14, 2008, 10:45:26 PM »

The following code illustrates the use of the Item property:

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 = "SYSTEM"
pWshEnv = pWsh.Environment(vType)
STDOUT ACODE$(pWshEnv.Item(UCODE$("NUMBER_OF_PROCESSORS")))