我是 WiX 的新手,我一直在尝试为我的应用程序创建安装程序。其余的事情都很好,但我被困在某一点上。将文件复制到程序文件文件夹后,我需要解压缩文件。我不确定 windows 是否可以直接执行此操作,所以我从互联网上获得了一个 unzip.exe,它可以正常解压缩。我也在我的程序文件文件夹中复制了该文件。但是我如何在那里解压缩我的文件。我尝试了以下代码但没有结果:-
**
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='Test' Id='xxxxxx' UpgradeCode='xxxxxxx'
Language='1033' Codepage='1252' Version='0.1.3' Manufacturer=''>
<Package Id='*' Keywords='Installer' Description=""
Comments='' Manufacturer=''
InstallerVersion='100' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
<Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" />
<Property Id='DiskPrompt' Value="Designer Installation [1]" />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
<Directory Id='Test' Name='Test'>
<Component Id='unzip' Guid='xxxxxxx'>
<File Id='unzipexe' Name='unzip.exe' DiskId='1' Source='unzip.exe' KeyPath='yes' />
</Component>
<Component Id='sdk' Guid='xxxxxxxx'>
<File Id='SDK' Name='sdk.zip' DiskId='1' Source='sdk.zip' KeyPath='yes' />
</Component>
<Component Id='testlogger' Guid='xxxxxxx'>
<File Id='TestLog' Name='Test.log' DiskId='1' Source='Test.log' KeyPath='yes' />
</Component>
</Directory>
</Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
</Directory>
<Feature Id='Complete' Level='1'>
<ComponentRef Id='unzip' />
<ComponentRef Id='sdk' />
<ComponentRef Id='testlogger' />
</Feature>
<Property Id='Unzipper'>TARGETDIR\ProgramFilesFolder\Test\unzip.exe</Property>
<CustomAction Id='zipFile' Property='Unzipper' ExeCommand='sdk.zip' Return='asyncWait'/>
<InstallExecuteSequence>
<Custom Action='zipFile' After='InstallFinalize'>NOT Installed</Custom>
</InstallExecuteSequence>
</Product>
</Wix>
**
有人可以帮我解决这个问题吗????