3

We have an EXE-packaged Electron application that needs to run under Windows with elevated privileges (uiAccess=true) to prevent user from accessing Windows when it runs in full screen.

Setting uiAccess="true" in the manifest file causes a problem: any loadURL() call is ignored silently, both for HTML files in local directory and to a locally running HTTP server.

  • With uiAccess set to false calling loadURL() works well, for any user
  • With uiAccess set to true calling loadURL() only works if the EXE is run by a user with admin privileges (even without running it "as administrator"), or if it is launched from a normal user account with "Run as Administrator" option.
  • Otherwise loadURL() does not do anything, without throwing any error

Everything else seems to work normally (creating windows, capturing events, etc.)

UPD: I've added logging and found out that two events are emitted by BrowserWindow's webContent shortly after calling loadURL:

"did-stop-loading"
"crashed"

This indicates that renderer process has crashed - but why? Setting ELECTRON_ENABLE_STACK_DUMPING and ELECTRON_ENABLE_LOGGING environment variables to true does not give any more info.

Any ideas what could be a reason, and how can it be solved?

David Avsajanishvili
  • 7,678
  • 2
  • 22
  • 24

0 Answers0