install4j:“Require privileges”操作在安静模式下对安装程序和卸载程序的行为有所不同

时间:2016-10-24 15:28:06

标签: install4j

我有:

  • install4j Multi-Platform Edition 6.1.3(build 6299)
  • Ubuntu 10.04.4 LTS
  • Java 1.8.0_45

当我在非root用户中以静默方式运行安装程序时,安装成功。但是,卸载要求我成为root用户才能运行。

以下是我的安装程序的配置:

Installation configurations for privileges

以下是我的卸载程序的配置:

enter image description here

以下是安装的日志片段,显示“请求权限”操作已成功。

[INFO] com.install4j.runtime.beans.actions.misc.RequestPrivilegesAction [ID 2776]: Execute action
   Property failIfNotRootUnix: false
   Property obtainIfAdminMac: false
   Property obtainIfAdminWin: true
   Property obtainIfNormalMac: false
   Property obtainIfNormalWin: false
   Property failIfNotObtainedWin: true
   Property allRequested: false
   Property failIfNotObtainedMac: true
   Property rollbackSupported: false
   Execute action successful after 2 ms
[INFO] com.install4j.runtime.beans.screens.StartupScreen [ID 15]: command: move 1 screens, executing actions, checking condition
[INFO] com.install4j.runtime.beans.screens.WelcomeScreen [ID 1]: Show screen

以下是取消安装的日志片段,显示由于权限不足而导致“需要安装程序权限”操作失败。

[INFO] com.install4j.runtime.beans.actions.misc.RequireInstallerPrivilegesAction [ID 2779]: Execute action
   Property failIfNotObtained: true
   Property rollbackSupported: false
[ERROR] com.install4j.runtime.beans.actions.misc.RequireInstallerPrivilegesAction [ID 2779]: Execute action not successful after 4494 ms
[INFO] com.install4j.runtime.beans.actions.misc.LoadResponseFileAction [ID 2778]: Rollback action
   Rollback action finished

我错误配置了什么吗?

修改 这是我运行安装程序时在命令行中传递的varfile中的变量。卸载程序:

logLocation=/folder/something
storeLocation=/folder/something
storeSize$Long=1
nmx.webserver.port$Long=8466
nmx.sharedDir=/folder/something
nmx.licenceFileName=/folder/something
nmx.userDir=/folder/something
sys.adminRights$Boolean=true
sys.languageId=en
sys.programGroupDisabled$Boolean=true

我的测试程序在普通用户下连续运行安装程序和卸载程序,即程序运行安装程序然后运行卸载程序。

0 个答案:

没有答案