开发者

COM Component Registration during .NET Setup Project

I have a project which uses a COM Component from Microsoft, which doesn't come with the system, and the default setup of this COM Component only installs the samples, it does not run regsvr32 on the component to make it available via add reference or for that matter, helping the CLR find the DLL.

The application I'm shipping uses this DSOFile sample to edit OLE file properties. It's for internal purposes.

How do I add a native component to a setup project and have the wizard run the correct开发者_运维百科 steps when launched?


I'm not sure I fully understood the question, but if you need to add a COM library to your setup project, and register it automatically when the setup executes do the following:

  1. Right-click on your setup project in the solution explorer, View->File System
  2. Right-click on the root item "File System on Target Machine" (in the Setup project view), select Add Special Folder->System Folder.
  3. Right-click on the newly added folder "System Folder", select Add->File
  4. A file browser dialog will appear, browse to the COM library (*.dll)
  5. When the "System Folder" folder is selected, COM library file will be displayed on the right side (in the Setup project view), right-click on the COM library file, select "Properties Window"
  6. Properties window should contain an item named "Register", select "vsdrfCOMSelfReg", and your COM component should be registered during setup, just like if you did the regsvr32 name.dll command.

Note: If you wish not to use System folder as the target folder for the COM library, skip the step #2, and consider "System Folder" as your target folder.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜