Ancestors

Toot

Written by Florian on 2024-10-23 at 00:50

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

Descendants

Written by Jamie Teh on 2024-10-23 at 01:35

@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

Written by Jamie Teh on 2024-10-23 at 01:40

@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

Written by NV Access on 2024-10-23 at 05:28

@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

Written by Florian on 2024-10-23 at 10:25

@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

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113353990195569494
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
271.32661 milliseconds
Gemini-to-HTML Time
0.730832 milliseconds

This content has been proxied by September (ba2dc).