vue-cli-plugin-electron-builder icon indicating copy to clipboard operation
vue-cli-plugin-electron-builder copied to clipboard

修改了productName之后打出来的包在重装或卸载时,异常地不能检查到正在运行的App,以提示是否用户关闭App

Open wuIsSky opened this issue 1 year ago • 5 comments

Describe the bug 修改了productName之后打出来的包在重装或卸载时,异常地不能检查到正在运行的App,以提示是否用户关闭App

To Reproduce electron打包之后安装,然后启动,然后: 1. 点击卸载,没有提示是否关闭正在运行的程序,2. 再次覆盖安装,没有提示是否关闭正在运行的程序

Expected behavior 当App正在运行中的时候,点击覆盖安装或者点击卸载,能够提示用户是否关闭当前正在运行的程序,当用户点击 "是" 之后才能继续进行覆盖安装或卸载

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • custom config for vcp-electron-builder: builderOptions: { "appId": "environmental.benefit.calculation", "productName": "计算软件", "copyright": "Copyright © 2022", "directories": { "output": "./dist_ebc" }, "win": { "icon": "./public/icon.ico", "target": [{ "target": "nsis", "arch": [ "x64", // "ia32" ] }] }, "nsis": { "oneClick": false, "allowElevation": true, "allowToChangeInstallationDirectory": true, "installerIcon": "./public/icon.ico", "uninstallerIcon": "./public/icon.ico", "installerHeaderIcon": "./public/icon.ico", "createDesktopShortcut": true, "createStartMenuShortcut": true, "shortcutName": "计算软件", "include": "build/uninstaller.nsh", "warningsAsErrors": false }, "extraResources": [{ "from": ".", "to": ".", "filter": ["extraResources/**"] }] }
  • (if possible) link to your repo:
  • terminal output from running vue info:

Additional context Add any other context about the problem here.

wuIsSky avatar Sep 15 '22 03:09 wuIsSky

Try to use nsis.guid ?

https://www.electron.build/configuration/nsis#guid-vs-application-name

klren0312 avatar Sep 15 '22 07:09 klren0312

Try to use nsis.guid ?

https://www.electron.build/configuration/nsis#guid-vs-application-name 试了,不起作用。当 builderOptions.productName 是 a 的时候,如果当前程序正在使用中,卸载时就会提示用户是否关闭当前正在运行的程序,但是当我把 builderOptions.productName 改成 b ,以上的情况就不会发生,而是直接开始进入卸载流程,并且由于程序正在使用,导致卸载不完全,有一些残留文件

wuIsSky avatar Sep 15 '22 09:09 wuIsSky

Try to use nsis.guid ? https://www.electron.build/configuration/nsis#guid-vs-application-name 试了,不起作用。当 builderOptions.productName 是 a 的时候,如果当前程序正在使用中,卸载时就会提示用户是否关闭当前正在运行的程序,但是当我把 builderOptions.productName 改成 b ,以上的情况就不会发生,而是直接开始进入卸载流程,并且由于程序正在使用,导致卸载不完全,有一些残留文件

我希望的效果是不管修改 builderOptions.productName 为什么值,程序都可以在卸载的时候检测程序是否正在运行,以提示用户是否关闭当前程序然后再继续

wuIsSky avatar Sep 15 '22 09:09 wuIsSky

Please convert all comments in this issue to English.

MatthijsBurgh avatar Sep 15 '22 11:09 MatthijsBurgh

Try to use nsis.guid ?

https://www.electron.build/configuration/nsis#guid-vs-application-name

I 'm sorry. I tried, but it didn't work. When builderOptions.productName is 'a', and if the current program is in use, the user will be prompted whether to close the currently running program when uninstalling. But if the productName is changed to 'b', the above situation will not occur, instead, the uninstallation process will start directly. Due to the program is in use, the uninstallation is incomplete, and there are some residual files.

I hope the effect is that no matter how to modify the builderOptions.productName, the program can detect whether the program is running when uninstalling to prompt the user whether to close the current program before continuing

wuIsSky avatar Sep 15 '22 13:09 wuIsSky