Commit eee455c2 authored by Misha Koshelev's avatar Misha Koshelev Committed by Alexandre Julliard

msi: Add JScript/VBScript support.

parent d70c9e76
......@@ -38,6 +38,7 @@ C_SRCS = \
record.c \
registry.c \
regsvr.c \
script.c \
select.c \
source.c \
streams.c \
......
......@@ -920,3 +920,9 @@ HRESULT create_msiserver(IUnknown *pOuter, LPVOID *ppObj)
{
return create_automation_object(0, pOuter, ppObj, &DIID_Installer, InstallerImpl_Invoke);
}
/* Wrapper around create_automation_object to create a session object. */
HRESULT create_session(MSIHANDLE msiHandle, IDispatch **pDispatch)
{
return create_automation_object(msiHandle, NULL, (LPVOID)pDispatch, &DIID_Session, SessionImpl_Invoke);
}
......@@ -981,6 +981,7 @@ static UINT HANDLE_CustomType34(MSIPACKAGE *package, LPCWSTR source,
static DWORD WINAPI ACTION_CallScript( const LPGUID guid )
{
msi_custom_action_info *info;
MSIHANDLE hPackage;
UINT r = ERROR_FUNCTION_FAILED;
info = find_action_by_guid( guid );
......@@ -990,7 +991,16 @@ static DWORD WINAPI ACTION_CallScript( const LPGUID guid )
return r;
}
FIXME("function %s, script %s\n", debugstr_w( info->target ), debugstr_w( info->source ) );
TRACE("function %s, script %s\n", debugstr_w( info->target ), debugstr_w( info->source ) );
hPackage = alloc_msihandle( &info->package->hdr );
if (hPackage)
{
r = call_script( hPackage, info->type, info->source, info->target, info->action );
MsiCloseHandle( hPackage );
}
else
ERR("failed to create handle for %p\n", info->package );
if (info->type & msidbCustomActionTypeAsync &&
info->type & msidbCustomActionTypeContinue)
......
......@@ -793,6 +793,11 @@ extern VOID ControlEvent_UnSubscribeToEvent( MSIPACKAGE *package, LPCWSTR event,
/* OLE automation */
extern HRESULT create_msiserver(IUnknown *pOuter, LPVOID *ppObj);
extern HRESULT create_session(MSIHANDLE msiHandle, IDispatch **pDispatch);
extern HRESULT load_type_info(IDispatch *iface, ITypeInfo **pptinfo, REFIID clsid, LCID lcid);
/* Scripting */
extern DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function, LPCWSTR action);
/* User Interface messages from the actions */
extern void ui_progress(MSIPACKAGE *, int, int, int, int);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment