安装后删除安装程序
我正在尝试在设备上安装电子应用程序后删除安装程序[NSIS],因此用户不需
要这样做
I'm trying to have the installer [NSIS] deleted after my electron app is installed on a device, so that the user needn't do so
Is there a possible way to achieve this
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,我不会真正推荐它,但是您可以尝试使用
delete
函数,指定安装程序文件并设置/rebootok
flag。该代码看起来像这样:
删除路径\ myinstaller.exe /rebootok < /code>
此标志试图立即删除文件,如果失败,则由于安装程序正在运行,它将删除它,它将删除它重新启动后。
请记住,安装后您必须重新启动计算机,否则文件将不会被删除。
让我知道这是否解决了您的问题。
So I would not really recommend it but you could try to use the
Delete
function, specify your installer-file and set the/REBOOTOK
Flag.The code would look something like this:
Delete path\myInstaller.exe /REBOOTOK
This Flag tries to Delete the File right away and if it fails, wich it will since the installer is running, it will delete it after a reboot.
Just keep in mind that you would have to reboot your computer after the installation or the file will not be deleted.
Let me know if this solved your problem.