will.ellis
Posts: 9
Joined: Tue May 08, 2012 5:14 pm

updater.exe: Does not uninstall Windows scheduled task

Using the Advanced Installer Updater feature, in the 'Run Updater' section I have set it to run as a Windows Scheduled Task. This all installs fine but I am finding that if the user uninstalls the application the updater task is being left behind.
Looking through the configuration settings of the update task in AI I can't find a setting that would stop this from being uninstalled along with the application.

Is this a bug or is there an extra step I need to take to ensure that the scheduled task will be uninstalled?
will.ellis
Posts: 9
Joined: Tue May 08, 2012 5:14 pm

Re: updater.exe: Does not uninstall Windows scheduled task

Thanks for the response. Sadly that post doesn't seem to directly apply here as essentially the uninstall of the scheduled task talked about there was just fixed with no real explanation of why it started working.

The only files I'm seeing left behind are:
C:\Windows\Systsem32\Tasks\[AppName]Updater.exe
C:\Windows\Tasks\[AppName]Updater.exe.job
C:\Windows\Prefetch\[AppName]Updater.exe-ED9FBE5B.pf

The problem is these files being left here mean that if you try to install the application again afterwards it will fail as the [AppName]Updater.exe is still installed.

I'm using Advanced Installer 9.1 if that's of any help.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: updater.exe: Does not uninstall Windows scheduled task

We'll try to replicate the behavior and get back to you soon.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: updater.exe: Does not uninstall Windows scheduled task

Unfortunately, we're not able to replicate this. Does this behavior manifest on any target machine ?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
will.ellis
Posts: 9
Joined: Tue May 08, 2012 5:14 pm

Re: updater.exe: Does not uninstall Windows scheduled task

Thanks for looking into this Mihai.
I've managed to reproduce our problem on a couple of Windows 7 machines and a Windows XP machine. Is there anything you might recommend I check to do with set up of an Updater?

If it helps these are the setting we have in the Updater section under Product Information:
  • - 'Check for updates before application install' is NOT checked
    - 'Enable Advanced Updater' is checked.
    - Settings: - Display:
    • File Name: OurAppUpdater
      File Icon: Not set
    - Run Updater:
    • As a Windows scheduled task
      - Configuration:
      Task Name: OurAppUpdater.exe
      Install Condition: 1
      Run: [#updater.exe]
      Command Line: /silent
      Working Folder: [APPDIR]
      User Account: Property based user
      User: [%UserDomain]\[LogonUser]
      Run only if user is logged on is checked
      A schedule is set
      Everything else in the task properties is either unchecked or blank
I've attempted a work around by doing an 'Uninstall Cleanup' on the files I mentioned were left behind, but this does not seem to remove them either.

Thanks again for your help.
will.ellis
Posts: 9
Joined: Tue May 08, 2012 5:14 pm

Re: updater.exe: Does not uninstall Windows scheduled task

Hi again Mihai.

I've actually managed to reproduce this with a very basic AI project with just an updater. I've attached it to this post.

Installing and uninstalling the test application leaves behind:
C:\Windows\System32\Tasks\TestUpdater.exe
C:\Windows\Prefetch\TESTUPDATER.EXE-FC56874A.pf
C:\Windows\Tasks\TestUpdater.exe.job

I'm using Windows 7 and am logged into an administrator account.
Attachments
setup.aip
Scheduled Task Not Removed
(13.14 KiB) Downloaded 412 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: updater.exe: Does not uninstall Windows scheduled task

Hello Will,

Our testing team managed to replicate this issue as well. We discussed the matter with the development team and the fix will be included in a future release.

Thank you for bringing this to our attention and for helping us make Advanced Installer a better product.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: updater.exe: Does not uninstall Windows scheduled task

Meanwhile, you can workaround this by removing the extension (".exe") from the scheduled task name.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
will.ellis
Posts: 9
Joined: Tue May 08, 2012 5:14 pm

Re: updater.exe: Does not uninstall Windows scheduled task

Cheers for the information Mihai, the workaround works perfectly (saves me having to have a SchTasks.exe uninstall custom action - the workaround I had put in.)

Thanks to you and the AI team on your quick response on this.
Will

Return to “Common Problems”