How can I take persistent permissions in electron app?

前端 未结 1 698
迷失自我
迷失自我 2021-02-13 07:04

I am creating an electron app where I need to scan and update files which need root permission. I know I can run such commands using sudo.exec() in that way:

su         


        
相关标签:
1条回答
  • 2021-02-13 07:59

    You need to run the applicaton with administrator privilege. If you are using electron builder to build the app, use the requestedExecutionLevel value as "requireAdministrator"

    https://www.electron.build/configuration/win

    0 讨论(0)
提交回复
热议问题