Page 1 of 1

Scheduled Task not deleting on uninstall

Posted: Wed Aug 25, 2010 12:41 pm
by gsaunders
I have a simple test install and with scheduled updates.

After installing the task is scheduled.
After uninstalling the task is still in the scheduler. Shouldn't it remove the task by default???

The only place I see a Delete Scheduled Task is in the updates script here:

Code: Select all

  if Variable UPDATE_KEEP Equals TRUE
    Get System Setting Windows NT Kernel (NT4, 2000, XP, 2003, Vista, 2008) into UPDATE_NTKERNEL
    if Variable UPDATE_NTKERNEL Equals TRUE
      Get System Setting Windows Vista into UPDATE_VISTA
      if Variable ALLUSERS Equals TRUE
        if Variable UPDATE_VISTA Equals FALSE
          Comment: 082510 - GCS - Set to update at log on
          Schedule Task $TITLE$ Updates to run when user logs on
          Comment: Schedule Task $TITLE$ Updates to run weekly
          else
          Comment: 082510 - GCS - Set to update at log on
          Schedule Task $TITLE$ Updates to run when user logs on
          Comment: Schedule Task $TITLE$ Updates to run weekly
        end
        else
        if Variable UPDATE_VISTA Equals FALSE
          Comment: 082510 - GCS - Set to update at log on
          Schedule Task $TITLE$ Updates to run when user logs on
          Comment: Schedule Task $TITLE$ Updates to run weekly
          else
          Comment: 082510 - GCS - Set to update at log on
          Schedule Task $TITLE$ Updates to run when user logs on
          Comment: Schedule Task $TITLE$ Updates to run weekly
        end
      end
      else
      if Variable ALLUSERS Equals TRUE
        Comment: 082510 - GCS - Set to update at log on
        Schedule Task $TITLE$ Updates to run when user logs on
        Comment: Schedule Task $TITLE$ Updates to run weekly
        else
        Comment: 082510 - GCS - Set to update at log on
        Schedule Task $TITLE$ Updates to run when user logs on
        Comment: Schedule Task $TITLE$ Updates to run weekly
      end
    end
    else
    Delete Scheduled Task $TITLE$ Updates
  end
This doesn't appear to be part of the uninstall.

So I ended up putting it here in the main script:

Code: Select all

if Variable REMOVE Equals TRUE
  Comment: Uninstall product
  Comment: TO-DO: Insert any additional uninstall commands here
  Apply Uninstall (get result into variable SUCCESS)
  Comment: 082510 - GCS - To get the scheduled task deleted
  Delete Scheduled Task $TITLE$ Updates
  Set Variable PROGRESS to 100
  else
I would have thought the uninstall would have this already built in?

Re: Scheduled Task not deleting on uninstall

Posted: Wed Aug 25, 2010 6:03 pm
by mills
You're correct. It should in fact the scheduled task. We'll get around to fixing this.

Re: Scheduled Task not deleting on uninstall

Posted: Thu Aug 26, 2010 7:09 am
by gsaunders
Glad to hear it.