AHK Not Starting At Boot

Get help with using AutoHotkey and its commands and hotkeys
09KR0058
Posts: 25
Joined: 11 Apr 2016, 18:08

AHK Not Starting At Boot

27 Feb 2020, 16:51

I have a shortcut to AHK in my Startup folder on a Windows 7 Ultimate x64 machine. Its been working just fine for years. Just noticed this week that it no long loads at startup while everything else in the startup folder works. I've checked Event Viewer and don't see anything there. Can't find any type of log file for AHK.

Any ideas as to what is happening here? Does AHK have any kind of log file to help diagnose what is happening?

Thank you
gregster
Posts: 5571
Joined: 30 Sep 2013, 06:48

Re: AHK Not Starting At Boot

27 Feb 2020, 16:58

First guess, your anti-virus is interfering.
09KR0058
Posts: 25
Joined: 11 Apr 2016, 18:08

Re: AHK Not Starting At Boot

28 Feb 2020, 16:52

That's one of the first things I checked and there is nothing blocking it.
User avatar
boiler
Posts: 6646
Joined: 21 Dec 2014, 02:44

Re: AHK Not Starting At Boot

28 Feb 2020, 19:42

When you run the script by double-clicking on the shortcut in the Startup folder, does it work as expected?

You might try adding a line to the start of the script that writes a line to a log file that notes the date/time when it runs, like this:

Code: Select all

FileAppend, % A_YYYY "-" A_MM "-" A_DD " " A_Hour ":" A_Min ":" A_Sec "`n", % A_ScriptDir "\LogFile.txt"
09KR0058
Posts: 25
Joined: 11 Apr 2016, 18:08

Re: AHK Not Starting At Boot

29 Feb 2020, 19:37

Thanks for the reply #boiler.

Manually running it from the Startup folder works fine. I have always had the following code at the top of the script:

Code: Select all

;
;
; Log the boot time
;
FormatTime, OutputLine, , yyyy-MM-dd HH:mm:ss
FileDelete, c:\BootTime.txt
FileAppend, %OutputLine%, c:\BootTime.txt
Yes, this isn't that big of a deal, but its driving me NUTS trying to figure out what the problem is! :headwall:
09KR0058
Posts: 25
Joined: 11 Apr 2016, 18:08

Re: AHK Not Starting At Boot

02 Mar 2020, 20:53

Any other ideas here?

I removed the shortcut from the Startup folder an created a new one, making sure it pointed to the script, not the exe. (Spent a couple hours chasing down that mistake some years ago). I can click on Start -> All Programs, scroll down to the Startup folder, click on it, then on the ahk shortcut and it launches file. The one other shortcut I have in that folder starts up fine when I boot.

I have checked my AV (Kaspersky Internet Security v19) and Malwarebytes (v4) and Windows Defender. However, the more I think about it, I can't see how either of them could be the culprit. They aren't even up and running when the items in the Startup folder are launched.

:crazy:

:wtf:
09KR0058
Posts: 25
Joined: 11 Apr 2016, 18:08

Re: AHK Not Starting At Boot

17 Mar 2020, 14:13

Still wrestling with this issue. I've even resorted to playing with Process Explorer and Process Monitor, but they really are no help.

I did find something interesting in RegEdit

Image

Do these two entries make any sense?
gregster
Posts: 5571
Joined: 30 Sep 2013, 06:48

Re: AHK Not Starting At Boot

17 Mar 2020, 14:16

09KR0058 wrote:
17 Mar 2020, 14:13
Do these two entries make any sense?
Entries look AHK compiler-related (probably adding the corresponding links to Windows' start menu, nothing to do with startup). Shouldn't affect booting - or anything. Something like this:

convert.png
convert.png (88.35 KiB) Viewed 388 times

Edit: It looks like the New Shortcuts are the ones recently added...

Return to “Ask For Help”

Who is online

Users browsing this forum: Bad husband, Bodhi, boiler, wineguy and 49 guests