在管理员和非管理员用户中安装应用程序时UAC提示电子
以下是我们的电子和构建器版本,
“电子”:“13.1.7” “电子构建器”:“22.11.9”
在电子构建器文件中,我们的配置有 “赢”: { “requestedExecutionLevel”:“需要管理员” 我们
和 nsis 配置如下,
"nsis": {
"warningsAsErrors": false,
"installerIcon": "assets/icon.ico",
"runAfterFinish": true,
"oneClick": true,
"perMachine": false,
"installerHeader": "assets/installerHeader.bmp",
"installerSidebar": "build/installerSidebar.bmp",
"createDesktopShortcut": true,
"include": "build/installer-qa2.nsh",
"artifactName": "${productName}.${ext}"
}
根据上面的配置,我们支持管理员和非管理员用户的应用程序,
面临两个问题:-
在管理员用户中安装应用程序时 ->;仅询问 UAC 提示并选择“是”和“否”, 每次运行应用程序时,都会询问相同的提示
- 在非管理员用户中安装应用程序时都会询问相同的提示 ->不询问 UAC 提示并提供管理员凭据,应用程序已正确安装, 但是每次我们退出应用程序后运行应用程序时,它每次都会提示UAC
我们想要实现的目标 -
在上面提到的第一点中,每次运行应用程序时不应要求带有“是”和“否”按钮的 UAC 提示
在上面提到的第二点中,它应该仅在安装/卸载应用程序时询问带有管理员凭据的 UAC 提示, 每次我们运行应用程序时,它不应该要求 UAC 提示
任何人都可以帮助我们实现上述几点吗?
below are our electron and builder versions,
"electron": "13.1.7"
"electron-builder": "22.11.9"
in electron-builder file, our configuration have
"win": {
"requestedExecutionLevel": "requireAdministrator"
}
and nsis configuration as below,
"nsis": {
"warningsAsErrors": false,
"installerIcon": "assets/icon.ico",
"runAfterFinish": true,
"oneClick": true,
"perMachine": false,
"installerHeader": "assets/installerHeader.bmp",
"installerSidebar": "build/installerSidebar.bmp",
"createDesktopShortcut": true,
"include": "build/installer-qa2.nsh",
"artifactName": "${productName}.${ext}"
}
as per above config, we have supported our application for both admin and non-admin user
we are facing 2 issues :-
at time of installing app in admin user -> asking UAC prompt only with Yes and No option,
and every time running application, asking same promptat time of installing app in non-admin user -> not asking UAC prompt with admin credentials, app gets installed properly,
but every time we run application after exit it, its asking UAC prompt every time
What we want to achieve -
in 1st point mentioned above, running app every time it should not ask for UAC prompt with Yes and No buttons
in 2nd point mentioned above, it should ask UAC prompt with admin credentials only at time of install/uninstall application,
it should not ask for UAC prompt every time we run the application
Can anyone please help us out to achieve as per above mentioned points?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论