Click here to Skip to main content
Click here to Skip to main content

C# Interfaces for the Windows Scripting Host

, 18 May 2007 CPOL
Rate this:
Please Sign up or sign in to vote.
Introducing a C# implementation of the interfaces required to implement a Windows Scripting Host
Screenshot - ZetaActiveScript_01.png


For the upcoming version 8 of our Windows based CMS Zeta Producer, I included the Windows Scripting Host for VBScript files into the application. Therefore I was in the need to get all the interfaces required to implement my own host.

Since it was rather hard and time-consuming to put all these interfaces together, I wrote this article to make it easier for others requiring the same information.

Therefore this article simply lists the interfaces but does not show any implementations of them. (Of course, please still do vote with a high rating for the article).

Defined Types

The following interfaces are defined:

The following enums are defined:

Using the Code

As mentioned above, this article is a reference for Windows Script interfaces, not an article about how to actually write your own Windows Scripting host.

For more information about this topic, please refer to Google or one of the following websites:


In this article, I've shown you the C# implementation of the interfaces to the Windows Scripting Host engine.

I would be happy to get your feedback in the comments section at the end of this article. Feel free to ask your questions or provide me with suggestions and enhancements.


  • 2007-05-18: Initial release of the article


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Uwe Keim
Chief Technology Officer Zeta Producer Desktop CMS
Germany Germany
Uwe does programming since 1989 with experiences in Assembler, C++, MFC and lots of web- and database stuff and now uses ASP.NET and C# extensively, too. He has also teached programming to students at the local university.
In his free time, he does climbing, running and mountain biking. Recently he became a father of a cute boy.
Some cool, free software from us:
German Developer Community  
Free Test Management Software - Intuitive, competitive, Test Plans. Download now!  
Homepage erstellen - Intuitive, very easy to use. Download now!  
Send large Files online for free by Email
Follow on   Twitter   Google+   LinkedIn

Comments and Discussions

Generalminimalistic implementation [modified] Pinmembervidocq_326-Nov-11 1:10 
QuestionHow to use it... Pinmemberdeep_spins1-Aug-11 1:13 
AnswerRe: How to use it... PinsitebuilderUwe Keim1-Aug-11 1:37 
GeneralCasting weirdness PinmemberPeter Wone3-Oct-08 2:09 
QuestionIActiveScriptSiteWindow PinmemberCrackhour15-Aug-08 17:57 
AnswerRe: IActiveScriptSiteWindow PinmemberCrackhour16-Aug-08 13:19 
GeneralScripting From Applications PinmemberGuy Schettig12-Aug-08 2:41 
GeneralRe: Scripting From Applications PinsitebuilderUwe Keim12-Aug-08 3:02 
GeneralGreat article Pinmemberarmagedescu19-Jul-07 0:33 
Beer | [beer]
Great article
But IActiveScript gives error when calling GetScriptDispatch.
I've fixed this by giving the MarshalAs type:
public interface IActiveScript
   void GetScriptDispatch(
	string itemName,
        [Out, MarshalAs(UnmanagedType.IDispatch)] out object ppdisp );

crc of abc

GeneralRe: Great article PinsitebuilderUwe Keim19-Jul-07 0:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150327.1 | Last Updated 18 May 2007
Article Copyright 2007 by Uwe Keim
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid