【发布时间】:2014-07-03 04:07:17
【问题描述】:
我的 IzPack 安装配置在 Linux 上运行良好。安装和卸载都按预期工作。
安装在 Windows 上也可以正常工作,但卸载不起作用。 IzPack 放置在系统上的卸载程序会进行工作,但实际上不会删除任何文件。我认为这是由于 UAC 阻止了它,因为如果我打开管理员 CLI 并执行“java -jar uninstaller.jar”它可以工作。是否有配置选项告诉它在卸载时需要提权?我的 install.xml 中已经有 <run-privileged condition="izpack.windowsinstall"/>(安装成功需要它,并且 Linux 安装需要 Windows 限制才能正常运行)。
我还注意到它没有显示在 Windows 的“添加/删除程序”部分。是否有一个简单的配置更改来设置它(如果它是大量的自定义代码,那是不值得的,但如果它不是太麻烦的话,我愿意支持它)?
安装.xml:
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<installation version="1.0">
<info>
<appname>Program</appname>
<appversion>5.0</appversion>
<appsubpath>The Corporation</appsubpath>
<javaversion>1.7</javaversion>
<uninstaller name="uninstaller.jar" path="${INSTALL_PATH}/uninstaller" write="yes"/>
<url>http://www.example.com</url>
<run-privileged condition="izpack.windowsinstall"/>
<pack200/>
</info>
<guiprefs width="640" height="480" resizable="no"/>
<locale>
<langpack iso3="eng"/>
</locale>
<resources>
<res id="LicencePanel.licence" src="License.txt"/>
<res id="InfoPanel.info" src="Readme.txt"/>
<res src="shortcutSpec.xml" id="shortcutSpec.xml"/>
<res src="unix_shortcutSpec.xml" id="unix_shortcutSpec.xml"/>
</resources>
<native type="izpack" name="ShellLink.dll"/>
<native type="izpack" name="ShellLink_x64.dll"/>
<native type="3rdparty" name="COIOSHelper.dll" stage="both">
<os family="windows"/>
</native>
<native type="3rdparty" name="COIOSHelper_x64.dll" stage="both">
<os family="windows"/>
</native>
<listeners>
<listener installer="RegistryInstallerListener" uninstaller="RegistryUninstallerListener" >
<os family="windows"/>
</listener>
</listeners>
<panels>
<panel classname="HelloPanel"/>
<panel classname="InfoPanel"/>
<panel classname="LicencePanel"/>
<panel classname="TargetPanel"/>
<panel classname="ShortcutPanel"/>
<panel classname="PacksPanel"/>
<panel classname="InstallPanel"/>
<panel classname="FinishPanel"/>
</panels>
<packs>
<pack name="Base" required="yes">
<description>The base files</description>
<file src="Readme.txt" targetdir="$INSTALL_PATH"/>
<file src="License.txt" targetdir="$INSTALL_PATH"/>
<file src="Program.jar" targetdir="$INSTALL_PATH"/>
<file src="lib" targetdir="$INSTALL_PATH"/>
</pack>
<pack name="Manual" preselected="yes" required="no">
<description>The documentation</description>
<file src="Manual.pdf" targetdir="$INSTALL_PATH"/>
</pack>
</packs>
</installation>
【问题讨论】: