• Welcome to Theos PowerBasic Museum 2017.

IWshEnvironment.Item Property

Started by José Roca, July 14, 2008, 10:45:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

José Roca



The following code illustrates the use of the Item property:


#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")))