开发者

How to create Custom action project with WIX 2.0

I have installed WIX 2.0 (and Votive). I need to create user defined custom actions using the Custom action project. I found the custom action project template in VS2008 when WIX 3.0 is installed. Now, I couldn't find any template in VS2005 with WIX 2.0.

Can anyone please let me know how can I create a custom action project (class with some custom action).. like this

[CustomAction]
public static ActionResult InstallItem1(Session session)

I think Microsoft.WindowsInstaller and Microsoft.Deployment.WindowsInstaller are the references required (not sure) to create such methods but i couldnt find them in my machine.


I managed to create a Custom Action project (just a Class Library with one class and the Custom Action methods) by referring 'Microsoft.WindowsInstaller' dll. But facing problem in executing that dll..

<Custom Action='_InstallItem2' After='_InstallItem1'/>

<CustomAction Id='_InstallItem2'
  BinaryKey='CustomActionLibrary.dll'   
  DllEntry='InstallItem2'
  Impersonate='yes'
  Execute='immediate'
  Return='check' />

<Binary Id='CustomActionLibrary.dll'
  SourceFile='C:\WIX\CustomActionLibrary.dll' />

There is a method called 'InstallItem2' marked as [CustomAction] in that dll.. But facing the error:

There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run(...)

Any idea why this error i开发者_如何学Pythons coming?


What you're looking for is actually a DTF (deployment tools foundation) project, but DTF was first released with WiX 3.0.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜