Я пытаюсь использовать специальное действие для запуска программы с параметром командной строки во время установки (после копирования файлов). Действие требует разрешения администратора (он устанавливает и устанавливает службу Windows). По какой-то причине пользовательское действие продолжает терпеть неудачу.Wix Custom Action при сбое установки
Мой Wix код:
<?xml version='1.0' encoding='Windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product
Name='WHS 2011 Media Collector'
Id='28656223-C2E0-4E74-8503-B9D668056C4E'
UpgradeCode='84F31832-4E09-4149-A3F7-56A8DF63086F'
Language='1033'
Codepage='1252'
Version='3.0.0'
Manufacturer='Nick Radtke'>
<Package
Id='*'
Keywords='Installer'
Platform="x64"
Description="WHS 2011 Media Collector" Comments='Deployment Package for WHS 2011 Media Collector'
Manufacturer='Nick Radtke'
InstallerVersion='300'
Languages='1033'
Compressed='yes'
SummaryCodepage='1252'
InstallPrivileges='elevated'
InstallScope='perMachine'/>
<Media
Id='1'
Cabinet='WSSSampleAddins.cab'
EmbedCab='yes'
DiskPrompt="CD-ROM #1" />
<Property Id='DiskPrompt' Value="Addins Installation [1]" />
<Property Id="LaunchApplication" Value=""MediaCollectorServerService.exe" -install"/>
<Property Id="MSIUSEREALADMINDETECTION" Value="1" />
<InstallExecuteSequence>
<Custom Action='LaunchApplication' Before='InstallFinalize'>NOT Installed</Custom>
</InstallExecuteSequence>
<CustomAction Id="LaunchApplication"
BinaryKey="WixCA"
Impersonate="no"
DllEntry="CAQuietExec64"
Execute="deferred"
Return="check"
/>
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFiles64Folder' Name='PFiles'>
<Directory Id="ParentAddinBinaryDir" Name="Nick Radtke">
<Directory Id="AddinBinaryDir" Name="WHS 2011 Media Collector">
<Component
Id='WHS2011MCBinaryComponent'
Guid='D21DA776-83F1-4F22-985B-FDB3C8ABD481'
Win64='yes'>
<RemoveFolder Id='AddinBinaryDir' On='uninstall' />
<File
Id='WHS2011MediaCollector.ListViewSubTab'
Name='WHS2011MediaCollector.ListViewSubTab.dll'
DiskId='1'
Source='..\..\MediaCollectorAddIn\MediaCollector\TopLevelTab\bin\Release\WHS2011MediaCollector.ListViewSubTab.dll'
ProcessorArchitecture='x64'
KeyPath='yes'>
</File>
<File
Id='WHS2011MediaCollector.TopLevelTab'
Name='WHS2011MediaCollector.TopLevelTab.dll'
DiskId='1'
Source='..\..\MediaCollectorAddIn\MediaCollector\TopLevelTab\bin\Release\WHS2011MediaCollector.TopLevelTab.dll'
ProcessorArchitecture='x64'
KeyPath='no'>
</File>
<File
Id='WHS2011MediaCollector.PicturesSubTab'
Name='WHS2011MediaCollector.PicturesSubTab.dll'
DiskId='1'
Source='..\..\MediaCollectorAddIn\MediaCollector\TopLevelTab\bin\Release\WHS2011MediaCollector.PicturesSubTab.dll'
ProcessorArchitecture='x64'
KeyPath='no'>
</File>
<File
Id='WHS2011MediaCollector.VideosSubTab'
Name='WHS2011MediaCollector.VideosSubTab.dll'
DiskId='1'
Source='..\..\MediaCollectorAddIn\MediaCollector\TopLevelTab\bin\Release\WHS2011MediaCollector.VideosSubTab.dll'
ProcessorArchitecture='x64'
KeyPath='no'>
</File>
<File
Id='WHS2011MediaCollector.SettingsSubTab'
Name='WHS2011MediaCollector.SettingsSubTab.dll'
DiskId='1'
Source='..\..\MediaCollectorAddIn\MediaCollector\TopLevelTab\bin\Release\WHS2011MediaCollector.SettingsSubTab.dll'
ProcessorArchitecture='x64'
KeyPath='no'>
</File>
<File
Id='NetLibrary'
Name='NetLibrary.dll'
DiskId='1'
Source='..\..\MediaCollectorAddIn\MediaCollector\TopLevelTab\bin\Release\NetLibrary.dll'
ProcessorArchitecture='x64'
KeyPath='no'>
</File>
<File
Id='Icon.png'
Name='Icon.png'
DiskId='1'
Source='..\..\MediaCollectorAddIn\MediaCollector\TopLevelTab\bin\Release\Icon.png'
ProcessorArchitecture='x64'
KeyPath='no'>
</File>
<File
Id='taglib_sharp'
Name='taglib-sharp.dll'
DiskId='1'
Source='..\..\MediaCollectorAddIn\MediaCollector\TopLevelTab\bin\Release\taglib-sharp.dll'
ProcessorArchitecture='x64'
KeyPath='no'>
</File>
<File
Id='MediaCollectorServerService.exe'
Name='MediaCollectorServerService.exe'
DiskId='1'
Source='..\..\MediaCollectorServerService\x64\Release\MediaCollectorServerService.exe'
ProcessorArchitecture='x64'
KeyPath='no'>
</File>
</Component>
</Directory>
</Directory>
<Directory Id="WindowsServerDir" Name="Windows Server">
<Directory Id="WindowsServerBinDir" Name="Bin">
<Directory Id="WindowsServerAddinsDir" Name="Addins">
<Directory Id="WindowsServerPrimaryDir" Name="Primary">
<Component
Id='WHS2011MCXMLComponent'
Guid='D21DA776-83F1-4F22-985B-FDB3C8ABD491'
Win64='yes'>
<File Id='WHS2011MCTopLevelTabXML'
Name='WHS2011MediaCollector.addin'
DiskId='1'
Source='..\..\MediaCollectorAddIn\MediaCollector\TopLevelTab\bin\Release\WHS2011MediaCollector.addin'
ProcessorArchitecture='x64'
KeyPath='yes'>
</File>
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
<Feature Id='Complete' Level='1'>
<ComponentRef Id='WHS2011MCBinaryComponent' />
<ComponentRef Id='WHS2011MCXMLComponent' />
</Feature>
</Product>
</Wix>
Это ошибка, я получаю в журнале Msi:
MSI (s) (40:30) [22:58:07:647]: Created Custom Action Server with PID 11672 (0x2D98).
MSI (s) (40:40) [22:58:07:663]: Running as a service.
MSI (s) (40:40) [22:58:07:663]: Hello, I'm your 32bit Elevated custom action server.
CAQuietExec64: Error 0x80070002: Command failed to execute.
CAQuietExec64: Error 0x80070002: CAQuietExec64 Failed
CustomAction LaunchApplication returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 22:58:07: InstallFinalize. Return value 3.
MSI (s) (40:D0) [22:58:07:694]: Note: 1: 2265 2: 3: -2147287035
При запуске из командной строки, как обычный пользователь, она не сможет, но если я запускаю его как пользователь admin (или пользователь системы), он работает. Я довольно уверен, что проблема заключается в разрешениях на действие. Я настроил его на отсрочку, а Impersonate = «нет», но он все еще не работает. У кого-нибудь есть подсказки?
Редактирование: Итак, я обнаружил, что, по-видимому, ярлыки в launchapplication не работают для пути исполняемого файла. Кто-нибудь знает синтаксис, который позволяет это?