set playerobject = CreateObject("wmplayer.ocx")For beginners out there who are asking "How do you know to use wmplayer.ocx?" I do have an answer! Using the oleview tool, you can figure out the name of the object you would like to create an instance of. If you'd like, follow along by opening up Oleview, and navigating to Objects Classes --> Grouped by Component Category --> Automation Objects --> Windows Media Player, and click that item. In the right-hand pane of Oleview, you'll see some information about the type library, and more specifically, the ProgID (or VersionIndependentProgID) of the object. This is what you need to know in order to create an instance of a COM object. While writing this article, I decided to randomly choose another object in the same list as another example, so go ahead and navigate to Microsoft Agent Control 2.0. Again, on the right side you should see the VersionIndependentProgID of "Agent.Control". By calling the built-in VBscript function CreateObject, you can instantiate this object as well.