安装完成后无法从install4j启动器运行应用程序

时间:2019-06-19 19:17:55

标签: install4j

我已经完成了安装程序的核心功能,但是需要增加用户在安装完成后启动应用程序的能力。

在安装过程的早期,我已经获得了提升的特权,但是当安装程序尝试启动该应用程序时,它将失败,并显示以下错误日志:

java.io.IOException: Cannot run program "C:\Program Files\abc\xyz\xyz 1.2.exe" (in directory "C:\Program Files\abc\xyz"): CreateProcess error=740, The requested operation requires elevation
at java.base/java.lang.ProcessBuilder.start(Unknown Source)
at java.base/java.lang.ProcessBuilder.start(Unknown Source)
at com.install4j.runtime.installer.helper.launching.LaunchHelper.launchOnWindows(LaunchHelper.java:387)
at com.install4j.runtime.installer.helper.launching.LaunchHelper.launchApplicationDirectly(LaunchHelper.java:151)
at com.install4j.runtime.installer.helper.launching.LaunchHelper.access$000(LaunchHelper.java:33)
at com.install4j.runtime.installer.helper.launching.LaunchHelper$2.fetchValue(LaunchHelper.java:110)
at com.install4j.runtime.installer.helper.launching.LaunchHelper$2.fetchValue(LaunchHelper.java:107)
at com.install4j.runtime.installer.helper.comm.actions.FetchObjectAction.execute(FetchObjectAction.java:14)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionWrapper(HelperCommunication.java:367)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.access$200(HelperCommunication.java:30)
at com.install4j.runtime.installer.helper.comm.HelperCommunication$1.run(HelperCommunication.java:96)
Caused by: java.io.IOException: CreateProcess error=740, The requested operation requires elevation
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
at java.base/java.lang.ProcessImpl.start(Unknown Source)
... 11 more

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

如果这是生成的启动器,请尝试在启动器向导的“可执行信息-> Windows清单选项”步骤中选择“作为调用者”。 “运行可执行文件”操作将提供特权。