nScriptHost is a .NET library that allows the execution of VBScript and JavaScript using the Microsoft Vsa engines. It allows developers to easily add scripting support to their application and allows scripts to interact with the application by letting the developer pass objects to the engine which are available as global objects to the scripts.

nScriptHost is primarily intended to be easy to use and to try to hide the different requirements of the VBScript engine and the JScript engine.

Using nScriptHost

The most recent documentation for nScriptHost is available on the wiki.

nScriptHost is very easy to use, however. Below is a minimalist example of how to use nScriptHost:

string scriptText = "import System.Windows.Forms;\r\nMessageBox.Show(\"Hello World!\")";
scriptHost = new ScriptingHost();
scriptHost.SetScript(scriptText, ScriptingLanguage.JScript);

As can be seen, using the engine can be incredibly simple. Despite the ease of use, the engine, scripting can provide a great deal of extended functionality for an application with very little work for the developer.

Getting nScriptHost

You can download nScriptHost here.

Project Web Page

The Sourceforge Project page for nScriptHost is here.