Chapter 11: Using Operating System Classes 243
Set objItem = objWMIService.get(wmiQuery)
errRTN=objItem.delete("notepad")
WScript.Echo(errRTN)
Working with Shares
There are 11 share-related operating system classes. Eight of these are association classes, and
only three are instance classes. Following are the three instance classes:
■ Win32_Share
■ Win32_ServerConnection
■ Win32_ServerSession
Each of these classes is interesting and can provide some valua
ble information to the network
administrator who is trying to get a handle on hundreds of shares that can be created on a
workstation or a server. As you have seen in recent years, controlling shares is also a big secu-
rity concern. Two of the classes, Win32_ServerConnection and Win3 ...