Is there some kind of trick to restarting NVDA programmatically? If I try to just task schedule or python subprocess c:\program files (x86)\nvda\nvda.exe I get "Requires elevation" errors even when running as privileged user. How does this work? @NVAccess #nvda
=> More informations about this toot | More toots from zersiax@cupoftea.social
@zersiax @NVAccess NVDA has the uiAccess privilege to enable access to the UI of apps running as admin. This requires a special kind of elevation. The easiest way to get that elevation is to use ShellExecute, which will verify that the app is in an allowed location for uiAccess apps and then elevate accordingly.
=> More informations about this toot | More toots from jcsteh@aus.social
@zersiax @NVAccess Python:
import ctypes; ctypes.windll.shell32.ShellExecuteW(None, None, r"c:\Program Files (x86)\nvda\nvda.exe", "", None, 1)
=> More informations about this toot | More toots from jcsteh@aus.social
@jcsteh @zersiax Ah Jamie has you sorted, ignore my earlier reply which is out of date :)
=> More informations about this toot | More toots from NVAccess@fosstodon.org
@jcsteh @NVAccess Thanks! :) I was noodling with it a bit more and noticed that supplying shell=True to subprocess also seems to work although using that is discouraged for security reasons, which is amusing :) I'll use this for now, thanks much
=> More informations about this toot | More toots from zersiax@cupoftea.social This content has been proxied by September (ba2dc).Proxy Information
text/gemini