Anyone having issues retrieving Excel com obj?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
croselzxcv
Posts: 4
Joined: 08 Dec 2018, 00:33

Re: Anyone having issues retrieving Excel com obj?

19 Aug 2019, 19:02

Relayer wrote:
29 Jan 2018, 09:27
This is solved. I thought I would post the resolution just in case it might save someone the frustration of dealing with windows.

Problem recap: Upgrade to windows 10 from 7 caused my AHK script that augments Excel to not function... "operation unavailable" when trying to connect to com.

Source of problem: mismatch between "run as administrator" setting with respect to AutoHotkey or Excel keeps the connection at bay. As soon as I turned that off on Excel, everything began to function as it did before the upgrade to win 10.

Relayer
Just signed in, so I could say THANK YOU!!!!!!!!!!!!!!!!!!! :dance:

-CroSelzxcv
eugenesv
Posts: 174
Joined: 21 Dec 2015, 10:11

Re: Anyone having issues retrieving Excel com obj?

01 Dec 2021, 01:57

FanaticGuru wrote:
15 Mar 2018, 16:18
It is more about a mismatch of permissions than having "high enough" permission. Admin can create as many problems as it solves. In alot of ways running as Admin tells Windows to watch this program very carefully because it wants permission to do dangerous stuff.
FG
It seems that enabling UIA on AutoHotkey.exe (via EnableUIAccess.ahk) also leads to these errors even when AutoHotkey is not running as admin, which is very unfortunate, now I can't even scroll horizontally in Word because of this :(
Do you have any idea on a potential fix or is this just another fundamental MS design flaw and I need to run a separate AHK process without UIA to make it cooperate properly with com objects?
User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

Re: Anyone having issues retrieving Excel com obj?

01 Dec 2021, 14:57

eugenesv wrote:
01 Dec 2021, 01:57
It seems that enabling UIA on AutoHotkey.exe (via EnableUIAccess.ahk) also leads to these errors even when AutoHotkey is not running as admin, which is very unfortunate, now I can't even scroll horizontally in Word because of this :(
Do you have any idea on a potential fix or is this just another fundamental MS design flaw and I need to run a separate AHK process without UIA to make it cooperate properly with com objects?

I don't use EnableUIAccess and have no particular insight into trouble shooting its usage.

I do know however that anti-virus software generally does not like it. It uses a technique similar to what some viruses use to get around interacting with Administrative Privilege. You might try turning off all anti-virus software temporarily and see if that helps. If that is the problem, then usually some type of exception can be created in the anti-virus software.

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks
eugenesv
Posts: 174
Joined: 21 Dec 2015, 10:11

Re: Anyone having issues retrieving Excel com obj?

02 Dec 2021, 01:36

FanaticGuru wrote:
01 Dec 2021, 14:57
You might try turning off all anti-virus software temporarily and see if that helps.
FG
Thanks for the suggesstion, unfortunately, it didn't help :(
(and I guess it's a rare enough case that even google has nothing on "UI Automation" and this error; though even for the broader admin←→non-admin interop permission mismatch it also has nothing useful, so guess it's indeed a fundamental limitation of this COM interop architecture)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 226 guests