}
TRACE("Scheduling action %s in script %u\n", debugstr_w(action), script);
- count = package->script->ActionCount[script];
- package->script->ActionCount[script]++;
- if (count != 0) newbuf = msi_realloc( package->script->Actions[script],
- package->script->ActionCount[script] * sizeof(WCHAR *) );
+ count = package->script_actions_count[script];
+ package->script_actions_count[script]++;
+ if (count != 0) newbuf = msi_realloc( package->script_actions[script],
+ package->script_actions_count[script] * sizeof(WCHAR *) );
else newbuf = msi_alloc( sizeof(WCHAR *) );
newbuf[count] = strdupW( action );
- package->script->Actions[script] = newbuf;
+ package->script_actions[script] = newbuf;
return ERROR_SUCCESS;
}
UINT count;
WCHAR **newbuf = NULL;
- if (!package->script) return FALSE;
-
TRACE("Registering %s as unique action\n", debugstr_w(action));
- count = package->script->UniqueActionsCount;
- package->script->UniqueActionsCount++;
- if (count != 0) newbuf = msi_realloc( package->script->UniqueActions,
- package->script->UniqueActionsCount * sizeof(WCHAR *) );
+ count = package->unique_actions_count;
+ package->unique_actions_count++;
+ if (count != 0) newbuf = msi_realloc( package->unique_actions,
+ package->unique_actions_count * sizeof(WCHAR *) );
else newbuf = msi_alloc( sizeof(WCHAR *) );
newbuf[count] = strdupW( action );
- package->script->UniqueActions = newbuf;
+ package->unique_actions = newbuf;
return ERROR_SUCCESS;
}
{
UINT i;
- if (!package->script) return FALSE;
-
- for (i = 0; i < package->script->UniqueActionsCount; i++)
+ for (i = 0; i < package->unique_actions_count; i++)
{
- if (!strcmpW( package->script->UniqueActions[i], action )) return TRUE;
+ if (!strcmpW( package->unique_actions[i], action )) return TRUE;
}
return FALSE;
}
static BOOL check_execution_scheduling_options(MSIPACKAGE *package, LPCWSTR action, UINT options)
{
- if (!package->script)
- return TRUE;
-
if ((options & msidbCustomActionTypeClientRepeat) ==
msidbCustomActionTypeClientRepeat)
{
- if (!(package->script->InWhatSequence & SEQUENCE_UI &&
- package->script->InWhatSequence & SEQUENCE_EXEC))
+ if (!(package->InWhatSequence & SEQUENCE_UI &&
+ package->InWhatSequence & SEQUENCE_EXEC))
{
TRACE("Skipping action due to dbCustomActionTypeClientRepeat option.\n");
return FALSE;
}
else if (options & msidbCustomActionTypeFirstSequence)
{
- if (package->script->InWhatSequence & SEQUENCE_UI &&
- package->script->InWhatSequence & SEQUENCE_EXEC )
+ if (package->InWhatSequence & SEQUENCE_UI &&
+ package->InWhatSequence & SEQUENCE_EXEC )
{
TRACE("Skipping action due to msidbCustomActionTypeFirstSequence option.\n");
return FALSE;
/* keep a reference to prevent the dll from being unloaded */
if (dll && !(binary->module = LoadLibraryW( tmpfile )))
{
- WARN( "failed to load dll %s (%u)\n", debugstr_w( tmpfile ), GetLastError() );
+ ERR( "failed to load dll %s (%u)\n", debugstr_w( tmpfile ), GetLastError() );
}
binary->source = strdupW( source );
binary->tmpfile = tmpfile;
hModule = LoadLibraryW( dll );
if (!hModule)
{
- WARN( "failed to load dll %s (%u)\n", debugstr_w( dll ), GetLastError() );
+ ERR( "failed to load dll %s (%u)\n", debugstr_w( dll ), GetLastError() );
return ERROR_SUCCESS;
}
}
if (!len_exe)
{
- WARN("can't find executable %u\n", GetLastError());
+ ERR("can't find executable %u\n", GetLastError());
msi_free( exe );
return INVALID_HANDLE_VALUE;
}
msi_free( exe );
if (!ret)
{
- WARN("unable to execute command %u\n", GetLastError());
+ ERR("unable to execute command %u\n", GetLastError());
return INVALID_HANDLE_VALUE;
}
CloseHandle( info.hThread );