Trouble installing V2

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
galen_burnett
Posts: 18
Joined: 18 Jan 2022, 03:57

Trouble installing V2

23 Mar 2024, 09:09

I'm using Windows 11.

I'm having trouble installing AutoHotKey V2. Please see this imgur link for screenshots detailing the problem. The first picture shows the initial installation window. The second and third pictures show the error messages that arise upon attempting to install. The user "linuxgurugamer", in their comment of 29 Feb 2024 at 19:29 in this thread, said they first installed V1 of AHK and then V2 "over it", and that that solved it for them; but upon trying to do that I myself was then presented with the window in the fourth picture in that imgur link, which implied that V2 had installed successfully after all, despite pictures two and three in that imgur link.

I then thought it best to uninstall V2 altogether before proceeding any further; but upon trying to do so using the "Add or remove programs" tool in Windows' Settings app I was presented with the window seen in the fifth picture of that same imgur address linked above.

How should I proceed? Should I use the Revo app to uninstall it?
lexikos
Posts: 9593
Joined: 30 Sep 2013, 04:07
Contact:

Re: Trouble installing V2

23 Mar 2024, 21:17

The second screenshot indicates one of the following:
  • A previous installation at the same location failed partway (i.e. the screenshot isn't from your first attempt).
  • You have manually extracted the installation files to the installation directory prior to running setup, or similar.
It is warning you so that if you have intentionally placed files there (customized or otherwise), you can cancel and your data will not be overwritten by setup.

If you just click "OK", installation proceeds.

The third screenshot shows that the installer is trying to create a keyset as part of generating the "UI Access" executable files (AutoHotkey*_UIA.exe), and is being denied access. I do not know specifically why this would occur; perhaps antivirus software or some unconventional security configuration on your system.

The fifth picture shows the expected uninstallation window, except that no individual versions are detected. You would want to remove AutoHotkey entirely anyway, so just click "Remove all".

If you still get the error showing CryptAcquireAccess, you can avoid it by performing a "Current user" installation. However, there are some differences in how/where the program and shortcuts are registered, and you will not have the "Run with UI access" context menu option or corresponding interpreter files (*_UIA.exe). The default directory is different, but you can still install into Program Files if you manually run setup as administrator and entering the path or clicking Browse and selecting it.

I would never trust a third-party app to correctly remove other software, no matter what anecdotal evidence users of that app may have.
galen_burnett
Posts: 18
Joined: 18 Jan 2022, 03:57

Re: Trouble installing V2

24 Mar 2024, 04:36

@lexikos But the thing is that, regarding the error messages shown on pictures 2 and 3, I think at least one of those messages was displayed the very first time I tried the installation process, the pictures themselves being taken during a subsequent installation attempt; installing onto a PC that had just had Windows 11 Clean-Installed onto itself.

I think it's probably Norton Antivirus having panic-attacks when I try and install it that's the problem. Would you know how I could stop Norton from interfering with the installation process?

Here's a further screenshot

https://imgur.com/a/a8YvuiY

that shows the message that appears when I click "Remove all" with respect to the fifth picture in the original imgur link; though, despite that message, that "Add or remove programs" Control Panel tool does seem to uninstall AHK successfully otherwise after-all...
lexikos
Posts: 9593
Joined: 30 Sep 2013, 04:07
Contact:

Re: Trouble installing V2

24 Mar 2024, 05:52

It is not possible for the message shown in picture 2 to appear if the files did not already exist before setup ran. The error shown in picture 3 is completely unrelated, and may well have occurred the first time around. This would have interrupted installation and put the installation directory in a state which would cause picture 2, like I wrote in my previous post.

As implied by the message in the last screenshot, you must delete the files manually (or you can let the next installation overwrite them). This has the same cause as the message shown in picture 2: a previous installation having been interrupted.

I feel I may be stating the obvious, but removing Norton Antivirus would stop it from interfering with anything. I cannot comment on which exact feature of that product could be responsible for the issue, if any, or how to disable it.
lexikos
Posts: 9593
Joined: 30 Sep 2013, 04:07
Contact:

Re: Trouble installing V2

24 Mar 2024, 16:37

I would suggest running the following to confirm that the private key (which setup was failing to open or create) does not already exist. If you are unable to run .ahk files by double-clicking, you can drag-drop the file onto a copy of AutoHotkey.exe (v2).

Code: Select all

#Requires AutoHotkey v2
if !DllCall("Advapi32\CryptAcquireContext", "ptr*", 0, "str", "AutoHotkey"
        , "ptr", 0, "uint", 1, "uint", 16) ; PROV_RSA_FULL=1, CRYPT_DELETEKEYSET=16
    throw OSError()
else
    MsgBox "Deleted"
lexikos
Posts: 9593
Joined: 30 Sep 2013, 04:07
Contact:

Re: Trouble installing V2

25 Mar 2024, 06:17

I have confirmed one possible cause of the "Access denied" error (at that specific line) is being denied write access to the subfolder of %APPDATA%\Microsoft\Crypto\RSA where the private key would be stored. Check that you (or the Administrators group) have write permission to that subfolder (the name starts with something like S-1-5-21...).
galen_burnett
Posts: 18
Joined: 18 Jan 2022, 03:57

Re: Trouble installing V2

25 Mar 2024, 07:57

@lexikos
The "S-1-5-[...]" folder for me lies at the following directory,

"C:\Users\galen\AppData\Roaming\Microsoft\Crypto\RSA\S-1-5-21-4141485105-2570466735-3408424402-1001"

and yes, I am able to open itself as well as its single file within without any Permission notices.

So I just tried installing it again, and though I received again the same notice as seen in the second picture of that original imgur link, I did not this time receive the one in the third picture of that same link; and, by your explanation, I understand a little better that notice in that second picture now. The installation process then continued without a hitch, nor with any interference whatsoever from Norton Antivirus.

I wonder what on earth the difference was this time...

Trying the 'private key' code you shared, it returns a message-box saying "Deleted".

As I did nonetheless receive that notice seen in the second picture of the original imgur link during this successful install, I presume that Windows' Settings "Add or remove app" tool did not fully uninstall AHK prior to my successfully installing it today. You say that the left-over files must be deleted in order for it to be fully uninstalled: well, I suggested in the OP using Revo to do that, yet you advised against using third-party apps in that regard... So is one in that situation to then just seek-out those files reported in the second picture of the original imgur link with File Explorer, and then manually delete them? I suppose that would be easy enough to do though honestly.

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: niCode, Noitalommi_2, w_i_k_i_d and 53 guests