3

My installed app creates a Task Scheduler task at run-time. This Task Scheduler task runs one of my installed apps at Windows log on. So I need to delete this Task Scheduler task at uninstall. Is the Inno Setup-Uninstaller able to do this?

OS: Win 7/8/10 x64

TylerH
  • 20,799
  • 66
  • 75
  • 101
user1580348
  • 5,721
  • 4
  • 43
  • 105

1 Answers1

7

Run schtasks /Delete from [UninstallRun] section:

[UninstallRun]
Filename: "schtasks"; Parameters: "/Delete /TN ""My Task"" /F"; Flags: runhidden

When the task does not exist, the command does nothing.


This is similar to creating a task with Inno Setup.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992