This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Deferred execution in system context
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 13, 2009
12:12 PM
Deferred execution in system context
Hi. I've got a custom action that runs one of my IS script functions. This works fine if it's set to immediate or deferred. However, if I set it to "deferred execution in system context", then it never gets run.
Any ideas what's causing this?
Cheers,
Dan.
Any ideas what's causing this?
Cheers,
Dan.
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 14, 2009
09:43 AM
Odd, this seems to working today! Can't think of anything related that I've changed.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 19, 2009
05:30 AM
Now we're having our QA department saying that the tasks I've changed to "deferred in system context" aren't happening 😞
Are there some scenarios where deferred in system context wouldn't run, when immediate execution would run?
Cheers,
Dan.
Are there some scenarios where deferred in system context wouldn't run, when immediate execution would run?
Cheers,
Dan.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 19, 2009
06:25 AM
What do your scripts do. Remember in system context you don't have access to a profile. Maybe your scripts need that? Ask QA for a verbose log too and that should tell you if it attempted to run your scripts or not. Unfortunately without a log you don't have much to go on right now
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 19, 2009
06:46 AM
Below is one of my functions. Note that the SprintfMsiLog logs aren't even appearing. Also below that are the relevant bits of my logs - the CA seems to be being called, but not the Installscript.
[code]
MSI (s) (6C:F4) [12:12:41:205]: Doing action: CA_AddToGamesExplorer
Action 12:12:41: CA_AddToGamesExplorer.
Action start 12:12:41: CA_AddToGamesExplorer.
CA_AddToGamesExplorer:
Action ended 12:12:41: CA_AddToGamesExplorer. Return value 1.
[/code]
[code]
MSI (s) (6C:F4) [12:12:55:978]: Executing op: ActionStart(Name=WriteRegistryValues,Description=Writing system registry values,Template=Key: [1], Name: [2], Value: [3])
[/code]
function AddToGamesExplorer(hMSI)
STRING szErrorString;
STRING szCustomDataDirecory;
NUMBER nLength;
begin
SprintfMsiLog("Start:AddToGamesExplorer");
nLength = MAX_PATH + 1;
MsiGetProperty(hMSI, "CustomActionData", szCustomDataDirecory, nLength);
StrRemoveLastSlash(szCustomDataDirecory);
if(LaunchApplication(szCustomDataDirecory ^ "Misc\\GDFInstall.exe", "/allusers /installpath \"" + szCustomDataDirecory + "\" main.exe", "", LAAW_STARTUPINFO.wShowWindow, LAAW_PARAMETERS.nTimeOut, LAAW_OPTION_CHANGEDIRECTORY | LAAW_OPTION_FIXUP_PROGRAM | LAAW_OPTION_USE_SHELLEXECUTE | LAAW_OPTION_WAIT) < 0) then
NumToStr(szErrorString, LAAW_PARAMETERS.nLaunchResult);
MessageBox("Failed to run " + szCustomDataDirecory ^ "Misc\\GDFInstall.exe (all users)(" + szErrorString + ")", WARNING);
endif;
SprintfMsiLog("End:AddToGamesExplorer");
end;
[code]
MSI (s) (6C:F4) [12:12:41:205]: Doing action: CA_AddToGamesExplorer
Action 12:12:41: CA_AddToGamesExplorer.
Action start 12:12:41: CA_AddToGamesExplorer.
CA_AddToGamesExplorer:
Action ended 12:12:41: CA_AddToGamesExplorer. Return value 1.
[/code]
[code]
MSI (s) (6C:F4) [12:12:55:978]: Executing op: ActionStart(Name=WriteRegistryValues,Description=Writing system registry values,Template=Key: [1], Name: [2], Value: [3])
[/code]
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 19, 2009
06:56 AM
Well according to the log the CA was definitely fired so the problem must be within the script itself. Do QA see the messagebox? Also you are only checking for negative return error codes. I suggest you check for <> 0 then the messagebox might provide some more info. I would also suggest you remove that messagebox once you have this issue sorted otherwise your installation can't be remotely deployed silently. Instead it should be logging.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 19, 2009
08:56 AM
Turns out it was a bug in Installshield. I used the hotfixed mentioned in this thread and it fixed the problem 🙂