Code Examples
  Home arrow Code Examples arrow Creating a Custom Object with WSC
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
CODE EXAMPLES

Creating a Custom Object with WSC
By: Nilpo
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2009-03-30

    Table of Contents:
  • Creating a Custom Object with WSC
  • Using the Script Component Wizard
  • Creating the Public Interface
  • Wrapping up the wizard

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Creating a Custom Object with WSC


    (Page 1 of 4 )

    In my last article I introduced the Windows Script Components technology as a means of creating your own custom COM objects without the need for high level programming or expensive development software. I also showed you how to build a basic object shell using nothing but a text editor and the scripting knowledge you already possess. Today, we’ll take all of that a step further and get our hands dirty creating a real, working object with all of the bells and whistles.

    I’m going to assume you read my last article, “Introducing Custom Objects with WSC.”  If you haven’t, you’ll still be able to follow along with this article, but you’ll be missing out on some very important information.  Be sure to take the time to read that article as well.

    Let’s jump right in.  The quickest way to create a Windows Script Component is by using Microsoft’s Windows Script Component Wizard.  The wizard is an intuitive tool that will output a basic WSC file for you based on your requirements.  It’s by far the fastest way to begin putting one of these together.  It also generates the unique GUID you’ll need if you plan on registering your object (which you probably do).  Of course, if you don’t plan on doing that, you can simply use the basic file layout that I presented in my last article.

    Whether you chose to use the WSC Wizard or not, you’ll need some basic information.  We’re going to be creating a component that will allow us to create and manipulate Compressed Folders.  You can use any name you like or you can use the ones I’ll be providing by copying them from the image below.  The first screen of the wizard should look something like this:

    wscw01.jpg

    The only real important one here is the Prog ID.  You’ll need to remember this for when you use your component later on.  In my case, I’m using the ZipFolder.WSC Prog ID, so I’ll instantiate my object like this in my scripts:

    Set objZipFolder = CreateObject("ZipFolder.WSC")

    More Code Examples Articles
    More By Nilpo


     

    CODE EXAMPLES ARTICLES

    - Bipartite Graphs
    - Connectivity in Graphs
    - The Ford-Fulkerson Algorithm
    - Critical Paths
    - The Bellman-Ford and Roy-Floyd Algorithms
    - Shortest Path Algorithms in Graphs
    - Minimum Spanning Tree
    - Articulation Edges and Vertexes
    - Circles and Connectivity in Graphs
    - Depth-First Search in Graphs
    - Breadth-First Search in Graphs
    - The Prufer Code and the Floyd-Warshall Algor...
    - An Insight into Graphs
    - Coding a Custom Object with WSC
    - Creating a Custom Object with WSC





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek