SetUp Process
1. Create the Windows Installer setup project and files
Create a new add-in using a SolidWorks API SOK template in Microsoft Visual Studio 2005 or 2008.
Open the add-in's solution file in Visual Studio.
Click File, Add, New Project to open the Add New Project dialog.
Expand Other Project Types in Project Types.
Click Setup and Deployment in Project Types.
Click Setup Project in Templates.
Type the name of your setup project in Name.
Click OK.
Select your new setup project in the Solution Explorer.
Click Project, Add, Project Output to open the Add Project Output Group dialog.
Select your add-in's project in Project.
Select Primary Output in the list.
Click OK.
2. Display your add-in in the SolidWorks Add-ins manager
Click View, Editor, Registry.
Expand HKEY _LOCAL_MACHINE.
Right-click Software, select New, Key, and type SolidWorks as the new key's name.
Right-click SolidWorks, select New, Key, and type Addins as the new key's name.
Right-click Addins, select New, Key, and type {Your add-in's GUID} as the new key's name.
NOTE: You must enclose the GUID in curly braces.
Right-click the GUID key, select New, DWORD Value.
Type Default Name and type the value set by your add-in's RegisterFunction function in Value.
Right-click the GUID key, select New, String Value
Type Description in Name and type the value set by your add-in's RegisterFunction function in Value (e.g., "MyNewAddin description").
Right-click the GUID key, select New, String Value.
Type Title in Name and type the value set by your add-in's RegisterFunction function in value(e.g.,"MyNewAddin").
Save and build the setup project.
A setup.exe file and a .msi file are created that you can use to distribute your add-in.
作者:AndyTGYan