2
已尝试为我的最新项目创建WiX安装程序。我有一个奇怪的问题,如果我通过cmd提示符运行msi作为管理它工作正常,自定义操作启动没有大惊小怪,一切正常,但如果我双击msi自定义操作不起作用,安装程序失败。我使用的Visual Studio 2012,并使用Windows 7WiX msi自定义操作未在Windows 7的有限权限下运行
<!--Custom Actions-->
<Binary Id='customShortcut' SourceFile='$(var.CustomDir)\TestInstallerCustom.CA.dll'/>
<Binary Id='customDir' SourceFile='$(var.CustomDir)\TestInstallerCustom.CA.dll'/>
<Binary Id='removeDir' SourceFile='$(var.CustomDir)\TestInstallerCustom.CA.dll'/>
<CustomAction Id='customShortcutId' BinaryKey='customShortcut' DllEntry='CustomShortcut'
Execute='immediate' Impersonate='no' Return='check' />
<CustomAction Id='customDirId' BinaryKey='customDir' DllEntry='CustomDir'
Execute='immediate' Impersonate='no' Return='check'/>
<CustomAction Id='removeDirId' BinaryKey='removeDir' DllEntry='RemoveDir'
Execute='immediate' Impersonate='no' Return='check'/>
<InstallExecuteSequence>
<Custom Action='customDirId' Before='InstallFinalize'/>
<Custom Action='customShortcutId' After='InstallFinalize'/>
<Custom Action="removeDirId" After="InstallValidate">REMOVE="ALL"</Custom>
</InstallExecuteSequence>
感谢您的答复。网上有关于回滚自定义操作的信息吗? – user2260125 2013-04-12 00:59:38
可以在http://msdn.microsoft.com/en-us/library/windows/desktop/aa371369(v=vs.85).aspx标记为“回滚自定义操作”的主题中 – 2013-04-12 03:00:22