0
我有一個小問題,那就是我必須從另一個MSI文件調用MSI文件。如何從另一個調用MSI文件,而無需使用WIX調用者安裝程序的一部分
它們都是獨立的,它們不屬於同一個安裝。
是否有可能使它與CustomAction?
我知道如果我使用引導程序,但我不能這樣做。
<
?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="MySetup" Language="1033" Version="1.0.0.0" Manufacturer="Sofiane" UpgradeCode="c151e7ab-b83a-445f-93b2-2ab7122ea34b">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Property Id="EXEPATH" Secure="yes"/>
<Feature Id="ProductFeature" Title="MySetup" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<Binary Id="InstallTools" SourceFile="$(var.SolutionDir)InstallTools\bin\$(var.Configuration)\InstallTools.CA.dll"/>
<CustomAction Id="SetupProps" BinaryKey="InstallTools" DllEntry="OpenExeUrl" Execute="immediate" Impersonate="yes" Return="check" />
<CustomAction Id="OpenExe" Return="ignore" Directory="exeDirectory" ExeCommand=""[EXEPATH]"" Impersonate="yes" Execute="deferred"/>
<InstallExecuteSequence>
<Custom Action="SetupProps" Before="OpenExe"/>
<Custom Action="OpenExe" After="InstallExecute"/>
</InstallExecuteSequence>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="MySetup" />
</Directory>
<Directory Id="exeDirectory" FileSource="@(EXEDIR)" />
</Directory>
</Fragment>
<Fragment>
<DirectoryRef Id="INSTALLFOLDER">
<Component Id="myAppFile">
<File Source="$(var.MyApplication.TargetPath)" />
</Component>
</DirectoryRef>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<ComponentRef Id="myAppFile" />
</ComponentGroup>
</Fragment>
</Wix>
在自定義操作OpenExe,EXEPATH是第二MSI文件來調用。
有什麼建議嗎?
第二個MSI文件只啓動一次...當我想重新啓動它不起作用。 – Sofiane 2014-10-17 10:11:19
你想多發一次嗎?我想我不明白你的問題,你能解釋一下嗎? – Buzka91 2014-10-17 10:15:00
在測試過程中,我想多次啓動它... – Sofiane 2014-10-17 12:00:19