1

My AutoIt script that executes from Windows Task Scheduler under Windows 7 works fine. On my Windows 10 machine with the identical task, instead of running the script, the Task Scheduler loads it into SciTE (an editor that accompanies AutoIt).

When I execute the script from within Explorer it runs. When I execute it from a command line it runs. It's only from Task Scheduler that I get this misbehavior. How do you tell Task Scheduler I want to run the script, not edit it?

Demodave
  • 5,752
  • 5
  • 37
  • 55
Argent
  • 785
  • 2
  • 7
  • 16

1 Answers1

2

If you do not wish to compile it, you can pass the script name to the AutoIt executable. For example:

"C:\Program Files (x86)\AutoIt3\AutoIt3.exe" "C:\Scripts\Test.au3"

This is how it would look in Task Scheduler:

enter image description here

And you can read more about AutoIt command line switches at this online help page.

Dale M
  • 803
  • 18
  • 20
  • Sidenote: Always make sure to set `Start in (optional)` in case to avoid errors. You can get in trouble if your script creates temporarly files. – Yaerox Jun 02 '17 at 06:24
  • This solution, and compiling the script, both work. It's just a shame that Microsoft took something that worked fine under Windows 7 and broke it for Windows 10, making workarounds necessary. – Argent Jun 03 '17 at 00:50