Ruud,

Thought I would toss this idea out there ... how about something like a LoadLibrary (COM TypeLibrary) feature ... kinda like loading a "reference" in Visual Basic ... it could be called like this:

$wsh = LoadLibrary("IWshRuntimeLibrary")

and then all the components of the library could be "creatable" right-out of the library reference ....

$fso = $wsh.FileSystemObject()

The BIG added benefit though is - we could access ALL the library information, especially things like Enumerations .... heres a green-lighting sample script:

Code:


$wsh = LoadLibrary("IWshRuntimeLibrary")

$fso = $wsh.FileSystemObject()

$drive = $fso.GetDrive("c:")

If $drive.DriveType = $wsh.Fixed Then
?"Drive is fixed"
EndIf



-Shawn