简体   繁体   English

是否可以使用 install4j 使应用程序自行重启

[英]Is it possible to make an application restart itself with install4j

I would like to be able to have my application restarted automatically every night.我希望能够让我的应用程序每晚自动重新启动。 Is this something that is possible to achieve using the ApplicationLauncher API of Install4j and how?这是可以使用 Install4j 的 ApplicationLauncher API 实现的吗?如何实现?

Thanks!谢谢!

Add a custom installer application on the Installer->Screens & Actions step with the "Default execution mode" property set to "Unattended mode".在 Installer->Screens & Actions 步骤中添加自定义安装程序应用程序,并将“Default execution mode”属性设置为“Unattended mode”。

In the "Startup" node, add a "Shut down calling launcher" action and a "Execute launcher" action.在“启动”节点中,添加“关闭调用启动器”操作和“执行启动器”操作。

To restart, call要重新启动,请致电

ApplicationLauncher.launchApplication("<ID of the application>", null, false, null);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM