Uh-oh. I have an Autohotkey script which has always run on startup, for years. I have just updated my W10 OS from 1607 to "the latest", which appears to be called "20H2".

Neither of the methods here seems to work now (I tried both a shortcut in the startup directory for specific user and then all users, and also Task Scheduler, including with a 30 s delay).

Anyone got any insights about this? Is "20H2" a defective thing full of holes and poorly engineered software? That would be a first for Microsoft*.

Incidentally, with the 30 s delay attempt, something does happen after 30s: I get a dialog saying "what application do you want to open this file?". When I choose a simple text editor (TextPad for example) I get a dialog saying "? - OK to create ''D:\My'". HAHAHAHAHAHA. I've become attached to my Windoze-induced misery over the years.


Have tried many things... to no avail. Not surprised in the slightest.

As user, I reinstalled AHK, latest, 1.1.33. I tried rebooting with and then without TaskScheduler task enabled. No joy. I noticed there is an extra option when you install AHK, by default unticked: "Add 'Run with UI Access' to context menus". Didn't seem promising, but I tried it. This then insisted that it had to be installed under C:\Program Files. OK. No.

I tried installing as admin, that is: cmd, "Run as administrator"... No.

I tried installing as "secret admin", that is by logging in as the special admin account. No.

Standard MS experience: it simply isn't working. Re the comment "you run the autohotkey script at startup the wrong way": any more to say about that? That shortcut is to an AHK script. When I click on it, it runs my startup script. It was present in both locations mentioned in this answer.

Finally found, first, a workaround (?) with Task Scheduler, and then a partial solution: see my answer...

*This comment is ironic.

  • How you run a script on start-up has not changed. If you are getting a prompt to choose how you open the script it means, Windows isn't aware how to handle the script, which likely means the problem is with the scheduled task itself.
    – Ramhound
    Feb 19, 2021 at 19:32
  • 1
    Sometimes after Windows upgrade some applications need to be reinstalled. Try to reinstall the latest AHK version.
    – harrymc
    Feb 19, 2021 at 20:37
  • Thanks both. I will try reinstalling AHK tomorrow... but I'm a little sceptical, as I can click on an AHK script (or shortcut to one), and it runs OK. Also the icon is unchanged. But I'll try it... Feb 19, 2021 at 21:07
  • Pretty sure either AHK needs to be installed or you run the autohotkey script at startup the wrong way. For example, if AHK is installed as normal user and the script is run as admin, that may break things.
    – LPChip
    Feb 19, 2021 at 21:43

1 Answer 1


Workaround (?) with Task Scheduler

I worked out the way to get the script to run using Task Scheduler: the path to the .exe file (AutoHotkeyU64.exe) is now in the box "Program/script", and the path to the .ahk script in the "Add arguments" box. It didn't work with the path to the script in "Program/script".

NB, for the benefit of anyone experiencing this problem: I find that I have to set a "Delay task for" in Task Scheduler: without it the script fails to run. Although it looks like the shortest delay you can set is "30 seconds", actually you can then edit that "Delay task for" box manually: I have currently set it to "10 seconds", and the script runs OK.

This script is the only thing I execute on startup, but would still be interested to know why the other method is broken on my system.

Partial solution after reinstalling as admin

Finally, when I put it in the "shell:common startup" location... it ran! So it doesn't work for the individual user, only for all users. No idea why. As I said above, previously it wasn't running in either startup location. So it presumably must be due to re-installing AHK (as admin?).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.