[Win10] CompareTool = CompareScript.ahk doesn't work anymore
Moderators: white, Hacker, petermad, Stefan2
- ghisler(Author)
- Site Admin
- Posts: 48199
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Do you get user account control dialog when trying to run the script? F4 doesn't support UAC. I do NOT get UAC when running the script.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Christian,
Thanks
Roman
Nope.Do you get user account control dialog when trying to run the script?
Umm, we're talking about the CompareTool= INI setting, right?F4 doesn't support UAC.
Thanks
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
- ghisler(Author)
- Site Admin
- Posts: 48199
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, TC uses CreateProcessW to execute the external compare command. CreateProcessW can handle very long command lines, but it cannot trigger the user account control dialog (UAC). Therefore programs which need to run with higher user rights cannot be started with CreateProcessW.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Christian,
I see and I found the culprit now. I am using an AutoHotkey.exe that requests "UI Access" so that it can work with programs that run at a higher privilige level:
Run with UI Access - AHK Help
How do I work around problems caused by User Account Control (UAC)? - AHK Help
Since the AutoHotkey.exe (with UI Access flag) is signed with a certificate and in a trusted location (Program Files), this works without needing to show an UAC prompt.
My current workaround which seems to work fine so far is specifying a non-UI Access AutoHotkeyU64.exe to run the compare script, i.e.:
Is there any way TC could run programs flagged as UI Access as the compare tool?
Thank you.
Roman
I see and I found the culprit now. I am using an AutoHotkey.exe that requests "UI Access" so that it can work with programs that run at a higher privilige level:
Enable interaction with administrative programs - Scripts and Functions - AutoHotkey CommunityWith User Account Control (UAC) enabled, most programs are prevented from interacting with any windows which are running at a higher privilege level. For AutoHotkey, this usually means that hotkeys and Send won't work with administrative programs unless the script is also run as administrator. Running a script as administrator is fairly simple; however, it has at least two significant drawbacks:
The need to deal with a UAC prompt each time the script starts.
Any programs the script launches also receive administrative privileges.
Microsoft's recommended solution is to flag the application as one that needs "UI access,"
Run with UI Access - AHK Help
How do I work around problems caused by User Account Control (UAC)? - AHK Help
Since the AutoHotkey.exe (with UI Access flag) is signed with a certificate and in a trusted location (Program Files), this works without needing to show an UAC prompt.
My current workaround which seems to work fine so far is specifying a non-UI Access AutoHotkeyU64.exe to run the compare script, i.e.:
Code: Select all
CompareTool="C:\Program Files\AutoHotkey\AutoHotkeyU64.exe" C:\Programy\AutoHotkey\Scripts\CompareFiles.ahk
Thank you.
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Well, if you intend to launch AutoHotkey as admin - which is one way to interact with elevated programs - Elevate can help you with that. On the other hand, runas.exe is already part of Windows, which might work in the same way.
One thing to note is that all programs launched by this particular AutoHotkey (script) will run elevated as well.
Regards
Dalai
One thing to note is that all programs launched by this particular AutoHotkey (script) will run elevated as well.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror