Deploying AHK with Configuration Manager (corporate setting)

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
CDSS
Posts: 4
Joined: 18 Jan 2023, 16:11

Deploying AHK with Configuration Manager (corporate setting)

Post by CDSS » 18 Jan 2023, 16:46

Hi folks,

We're trying to push out the latest and greatest AHK, 2.0.2, via our deployment software Microsoft Endpoint Configuration Manager (aka CM / ConfigMgr / Configuration Manager / SCCM / MECM / et.al) and we're running into a minor hiccup. I'm not sure if it is relevant or not, but we also run Windows Defender Application Control (WDAC) on the network, although no logs are captured by WDAC during the failing install. Our users have no admin rights and so, for software to be installed, this is the only way.

After failing with the setup.exe I moved to using the zip file. This method failed as well though.

The install code I'm using is this...

Code: Select all

start "" "%~dp0AutoHotkey32.exe" "%~dp0UX\install.ahk" /to "C:\Program Files\AutoHotkey" /silent
The error message I get is this...

Code: Select all

Error: File or manifest not found

Specifically: v2\AutoHotkey32_UIA.exe

	---- C:\Windows\ccmcache\c4\UX\inc\EnableUIAccess.ahk
	033: xml.setProperty("SelectionNamespaces" , "xmlns:v1='urn:schemas-microsoft-com:asm.v1' " . "xmlns:v3='urn:schemas-microsoft-com:asm.v3'")
	036: If !xml.load("res://" ExePath "/#24/#1")
▶	037: Throw Error("File or manifest not found",, ExePath)
	039: node := xml.selectSingleNode("/v1:assembly/v3:trustInfo/v3:security" . "/v3:requestedPrivileges/v3:requestedExecutionLevel")
	041: If !node

The current thread will exit.

Call stack:
C:\Windows\ccmcache\c4\UX\inc\EnableUIAccess.ahk (37) : [EnableUIAccess_SetManifest] Throw Error("File or manifest not found",, ExePath)
C:\Windows\ccmcache\c4\UX\inc\EnableUIAccess.ahk (24) : [EnableUIAccess] EnableUIAccess_SetManifest(ExePath)
C:\Windows\ccmcache\c4\UX\install.ahk (887) : [Installation.Prototype.MakeUIA] EnableUIAccess(newPath)
C:\Windows\ccmcache\c4\UX\install.ahk (180) : [Installation.Prototype.Apply] item(this)
C:\Windows\ccmcache\c4\UX\install.ahk (266) : [Installation.Prototype.InstallFull] this.Apply()
C:\Windows\ccmcache\c4\UX\install.ahk (45) : [Install_Main] inst.%method%(params*)
C:\Windows\ccmcache\c4\UX\install.ahk (16) : [] Install_Main()
> Auto-execute
I hit the ExitApp button on the error window and when I compare the installation with an install on my dev machine, because it does still kind of half/most install, I see that five (5) files are missing...
  • C:\Program Files\AutoHotkey\WindowSpy.ahk
  • C:\Program Files\AutoHotkey\UX\installed-files.csv
  • C:\Program Files\AutoHotkey\v2\AutoHotkey.exe (the symlink)
  • C:\Program Files\AutoHotkey\v2\AutoHotkey32_UIA.exe
  • C:\Program Files\AutoHotkey\v2\AutoHotkey64_UIA.exe
So, I was wondering, any ideas? Is this "half" install still good to use?

If you want any more information, just ask.

Kind regards,
Daniel.

CDSS
Posts: 4
Joined: 18 Jan 2023, 16:11

Re: Deploying AHK with Configuration Manager (corporate setting)

Post by CDSS » 09 Feb 2023, 18:13

Hi folks,

Just giving this one a bump is all :)

gmoises
Posts: 75
Joined: 18 Nov 2017, 16:43

Re: Deploying AHK with Configuration Manager (corporate setting)

Post by gmoises » 10 Feb 2023, 10:23

The directory 'c:\ Program Files' is protected by Windows and requires UAC
but you can install in the directory 'C:\Users\YourUserName\AppData\Local'

CDSS
Posts: 4
Joined: 18 Jan 2023, 16:11

Re: Deploying AHK with Configuration Manager (corporate setting)

Post by CDSS » 11 Feb 2023, 16:38

Normally I would allow/do that, but because we're using WDAC (Windows Defender Application Control), Microsoft's application whitelisting software, policy is that we're only allowed to install to PF or PFx86.

I've read this in the doco... https://www.autohotkey.com/docs/v2/Program.htm#Installer_uiAccess

So am I right in thinking then that the five (5) files missing from installation, are files that are only required for AHK's auto-UAC-elevation implementation?
Will the app work perfectly fine without those five (5) files then?

I'd have to go back and look things over again, as it's been a little bit since I last looked at this, but is there a way to have the install complete "successfully" without throwing an error due to being unable to install these files then?
Is there an install option I'm not using that is available that does this?

Once I'm back in the office Monday morning, I'll have another play.

Thanks for the response.

Kind regards,
Daniel.

bokkabonga
Posts: 3
Joined: 16 Jan 2023, 03:58

Re: Deploying AHK with Configuration Manager (corporate setting)

Post by bokkabonga » 15 Feb 2023, 07:15

Did you ever find a Solution for this? I just started to face the same problem using OPSI as our Software Deployment tool

CDSS
Posts: 4
Joined: 18 Jan 2023, 16:11

Re: Deploying AHK with Configuration Manager (corporate setting)

Post by CDSS » 15 Feb 2023, 17:49

Hey bokkabonga,

No, not yet. I was hoping to hear something official from AHK staff / support, but nothing yet.

And I haven't gone back to our AHK deployment yet either as our department has recently purchased PatchMyPC and so I'm finishing off setting that up. Once I have finished setting it up, I was going to see whether PatchMyPC would be able to deploy AHK correctly, as such, through ConfigMgr or not. PatchMyPC is a "plugin" of sorts for ConfigMgr. It extends the 'Third-Party Software Update Catalog' feature/function.

I'll post back once I have tested this.

Kind regards,
Daniel.


Post Reply

Return to “Ask for Help (v1)”