compiled script stops working windows 10

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
mrg9999
Posts: 3
Joined: 13 Apr 2016, 01:32

compiled script stops working windows 10

Post by mrg9999 » 08 May 2021, 04:34

I've used AHK since about 2005 and found it 100% reliable at work across many thousands of workstations and obviously my own. Now I get a compiled script unresponsive on some clients. I think this is a probably Windows 10 problem, I have clients that run for months that still work. The problem ones mostly seem to be interactive workstations.

How should I look at trying to debug and resolve this?

It doesn't happen if the script is running with interpreter whether it be one script or multiple that I tend to use when adding a new function to my core scripts.
My scripts are fairly simple low cpu usage doing things like inserting text into hotkeys or scanning documents when pressing F9 and replacing text with company standard
e.g. "Acme Corp. Worldwide (2021)" from "AcMe corp USA" or "AcmE crop PRC" etc

What I'm currently doing as a fix is using a powershell script run by the scheduler to test a function in the ahk script and if it fails it kills and re spawns the ahk script and that works ok, but is klunky.

How do I resolve this?
User avatar
mikeyww
Posts: 27070
Joined: 09 Sep 2014, 18:38

Re: compiled script stops working windows 10

Post by mikeyww » 08 May 2021, 05:38

Two common problems are UAC or admin issues, and anti-virus software. You might have a look at both.
mrg9999
Posts: 3
Joined: 13 Apr 2016, 01:32

Re: compiled script stops working windows 10

Post by mrg9999 » 08 May 2021, 19:41

Hi Thanks.
The scripts run in local administrator mode context, are whitelisted by the AV. I may try some more specific logging and ping the app more

Trouble is it never breaks when I'm using my workstation only when I return
User avatar
boiler
Posts: 17054
Joined: 21 Dec 2014, 02:44

Re: compiled script stops working windows 10

Post by boiler » 08 May 2021, 22:05

mrg9999 wrote: The scripts run in local administrator mode context
What mechanism for running the scripts as administrator did you use? The user having administrative privileges doesn't necessarily mean that the script will be running as admin and be able to interact with apps that are running as an elevated process. The script may also need to run as an elevated process regardless of the user's privileges. Did you right-click on the script in File Explorer and choose "Run as administrator"? If not, try it to see if that's the issue.
User avatar
mikeyww
Posts: 27070
Joined: 09 Sep 2014, 18:38

Re: compiled script stops working windows 10

Post by mikeyww » 09 May 2021, 05:09

Also: as documentation notes, if you are using code to restart the script as admin, the code is different for compiled scripts.
Post Reply

Return to “Ask for Help (v1)”