-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow UIAccess on Windows to work with elevated apps #19
Comments
The prebult windows exe is compiled with As aside, I'll soon be adding a button in tray menu to allow reading kanata-tray logs with the disabled console too. For now though if you want to logs, you need to compile it manually with that |
The build command for windows is here Lines 14 to 15 in 7739730
|
So it's how you launch it: you're still launching kanata.exe as a cli app with cli flags, and I get the same message when I try to launch kanata from a terminal, but double click works
|
https://gist.github.com/jerblack/d0eb182cc5a1c1d92d92a4c4fcc416c6 this seems like it could work I rarely use Windows these days, it's unlikely I'll work on it. However PR's welcome |
That seems like a way to launch kanata elevated, but this isn't needed, UIAccess works without elevation on "double-click" launch. |
It could still be useful depending on whether we want entire kanata-tray app to be elavated (would all spawned subprocesses be elevated automatically too? Like in linux?) or popup UAC every time a preset is ran for which we explicitly declare (with an new option in config) that we want elevation for kanata. Or even better, we could implement both, maybe. |
Add a `gui` feature allowing compiling kanata as a native tray-only Windows GUI application. This greatly simplifies launching the app on startup instead of resorting to hacks like this: #193 It gets rid of the console window and also allows UIAccess to work in elevated apps. There is a kanata-tray project which helps with the former, but doesn't allow UIAccess. issue: (rszyma/kanata-tray#19) It also supports custom icon indicator per config and per layer within the same config, as well as (re)loading configs. Other configs are passed as cli args in the `.lnk` file It also supports being launched from a console as a regular cli app, so it's possible to replace the main `kanata.exe` with this or let it be some separate `kanata-tray.exe` file It also opens an avenue to more interesting ideas, but will add those in a separate issue #991
FYI found the following tidbid on launching UIAcceess apps: UIAccess-enabled programs cannot be launched using |
Thanks for the info. Though, I've no plans to implement it, especially for Windows, because I've recently uninstalled it (previously ran dual boot, but mainly driving Linux). But if you feel like adding it, feel free to send PR. BTW, now that we have native tray icon support in kanata, I'm thinking about deprecating and archiving this repo. I'll wait with pulling the trigger when there's also native Linux and macOS support added. |
That's fine, just FYI, on Windows I'm also using the native gui version, so don't plan to add it here, especially since I know no GO |
Kanata.exe will be able to work in elevated apps on Windows when this is merged.
But I couldn't make it work with your tray app. Even if both are signed in the same way with UIAccess enabled, and within Program Files, I get an error while loading kanata (and there are no logs since I guess logs are only available from kanata after it starts)
(also tried
Not sure if there is something special you need to do to load another UIA app, but would be nice if that were possible
The text was updated successfully, but these errors were encountered: