Loading
Upgrade failure due to Scheduled Task
I have a server application (web site, web services, Windows service) I've created an basic MSI installer for. On a new install, the installer creates a scheduled task and it runs as expected each day. On upgrades, however, the installer fails with the error:

 

[CODE]03640: (Unknown): Action 11:58:29: ISScheduledTasksInstall.

 

03641: (Server): MSI (s) (1C:84) [11:58:29:907]: Executing op: CustomActionSchedule(Action=ISScheduledTasksInstall,ActionType=3073,Source=BinaryData,Target=ISScheduledTasksInstall,CustomActionData=C:\Users\babaltz\AppData\Local\Temp\~95AC.tmp)

 

03642: (Server): MSI (s) (1C:8C) [11:58:29:908]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIA37C.tmp, Entrypoint: ISScheduledTasksInstall

 

03643: (Unknown): InstallShield 11:58:29: Adding Scheduled Task: New Task

 

03644: (Unknown): InstallShield 11:58:29: An error occurred : The file exists.

 

03645: (Unknown):

 

03646: (Unknown): CustomAction ISScheduledTasksInstall returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)

 

03647: (Unknown): Action ended 11:58:29: InstallFinalize. Return value 3.

 

[/CODE]

 

The scheduled task runs a console app once a day that generates two files.

 

Is this a known issue. Is the failure really due to the Scheduled Task, or something else?

 

Thanks.

 

Brian

  • I found a workaround to this issue. I think this is a bug in InstallShield 2012 Sprint. I don't know if it's been fixed in future versions though.

     

    Basically, the original installer created a Scheduled Task (via ISScheduledTasksInstall) which created a file - C:\Windows\system32\Tasks\xxxx. The upgrade tries to install this task again but fails because the file already exists on the target. The upgrade then rolls back and requires Microsoft's FixIt tool to uninstall.

     

    I ended up creating a custom action to run before ISScheduledTasksInstall (after InstallService) that ran the command line:

     

    Command: cmd.exe /C schtasks /delete /tn "xxxx" /f

     

    Condition: Installed AND NOT REMOVE

     

    It's ugly but works (so far).

     

    Brian
    Expand Post

Loading
Upgrade failure due to Scheduled Task