You can use the Windows Script Host interfaces, IActiveScript
and IActiveScriptParse
, to execute Javascript/VBScript from memory. You can then compile your Javascript/VBScript into a resource, extract it at runtime, and then execute it when needed.
Update: have a look at this blog article:
Adding Active Scripting to your Delphi Win32 application
And then look at this discussion to make it work in 64bit: