Search code examples
vb6perlscriptmsscriptcontrol

Getting an error while selecting the language of MS Script Control 1.0 as Perl Script


In my VB 6 application, I am using Script Control 1.0 for running external scripts through my application. But while running, I am getting the below error.

"Error running Perl script: A script engine for the specified language can not be created."

I've installed ActivePerl 5.14 and the error is occurring while running the code below:

Dim perl As New ScriptControl
perl.Language = "PerlScript"

Any ideas what the problem may be?


Solution

  • The error means that matching language engine can not be found.

    Make sure that you do select PerlScript when installing Active Perl (it is selected by default, at least in the latest version):

    enter image description here

    Successful installation creates PerlScript key under HKEY_CLASSES_ROOT hive. This key should have CLSID subkey with CLSID of Active Script language engine. Component having this CLSID should be registered in the system. In my installation the component's binary is C:\Perl\bin\PerlSE.dll.