我有:
当我在非root用户中以静默方式运行安装程序时,安装成功。但是,卸载要求我成为root用户才能运行。
以下是我的安装程序的配置:
以下是我的卸载程序的配置:
以下是安装的日志片段,显示“请求权限”操作已成功。
[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
我的测试程序在普通用户下连续运行安装程序和卸载程序,即程序运行安装程序然后运行卸载程序。