安装后删除安装程序

发布于 2025-01-25 03:49:21 字数 56 浏览 3 评论 0原文

我正在尝试在设备上安装电子应用程序后删除安装程序[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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

残花月 2025-02-01 03:49:21

因此,我不会真正推荐它,但是您可以尝试使用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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文