Electron/vuejs app not loaded by setting "Always on top"/ uiAccess true

2022-07-16T08:40:39.2+00:00

I want to use electron to develop an app to show above lock screen. I need to set my window alwaysOnTop and set the uiAccess of the exe as true.
The exe can load index.html successfully without uiAccess change, but when I change the uiAccess to true, the exe can only create a window but the
window is blank, sometimes it's white while sometimes it's black.I tried to log some event and found that the crashed event was triggered if
I open the exe with non-Administrator. If I open the exe with administrator,the 'did-finish-load' was triggered but the window is black, didn't
show my index.html. How can I fix this?

Steps followed:

1.After installation of NodeJS
2.Created a sample application using the following commands

https://itnext.io/electron-application-with-vue-js-and-vuetify-f2a1f9c749b8

=> npm install -g @Vue /cli
=> vue --version
=> vue create sample-electron-app
=> cd sample-electron-app
=> npm run serve
=> vue add vuetify
=> npm run serve
=> vue add electron-builder
=> npm run electron:serve

3.Builded electron exe using command - npm run electron:build
4.Installed the sample application and placed the bin files under
"C:\Program Files\sample-electron-app"
5.Created the manifest file for the sample-electron-app.exe using mt.exe
mt.exe -inputresource:"..\sample-electron-app.exe";#1 -out:"..\manifest.xml"
6.Updated the uiAccess="true" in manifest.xml file
<requestedExecutionLevel level="asInvoker" uiAccess="true"></requestedExecutionLevel>
7.Embedded the manifest file to executable using following command
mt -manifest "..\manifest.xml" -outputresource:"..\sample-electron-app.exe";1
8.Created the the sample certificate using visual studio and digitally signed using the signtool.exe
signtool.exe sign /as /fd sha256 /tr http://timestamp.comodoca.com /td sha256 /f "..\samplecertificate.pfx" /p @AJAY "..\sample-electron-app.exe"
=> Open sample-electron-app.exe properties under Digital Signatures tab
=> Select the signature under signature list and view certificate and click install
=> Select local machine
=> Select Place all certificates in the following store and browse Trusted People and Click Finish.

221330-certificate.png

9.Open the properties of sample-electron-app.exe and in the compatibility tab ->settings ->Check [run this program as administrator]
10.Now Launch the application as run as administrator.
11.Application launch successfully but entire application is white /blank screen.

221372-certificate.png

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
942 questions
{count} votes