installer - How to run heat.exe and register a dll in wix -


i need register dll in regasm , using

 <customaction id='comreg' directory='installlocation'                   execommand='"[windowsfolder]microsoft.net\framework\v4.0.30319\regasm.exe" "[installlocation]myproduct.dll"  /codebase' return='check' /> 

to register , unregister

<customaction id='comunreg' directory='installlocation' execommand='"[windowsfolder]microsoft.net\framework\v4.0.30319\regasm.exe" /u "[installlocation]myproduct.dll"  /codebase' return='check' /> 

am using , installing , somnetimes gives error. recommending use heat.exe, http://wixtoolset.org/documentation/manual/v3/overview/heat.html went through link,but need how use in wix , stuff.i need tuitorial

heat used scrape directories or files , generate .wxs files include in installer. if wish generate registry information .net dll com interface can use command following:

heat.exe file c:\<path_to_com_dll>\com.dll -dr installfolder -srd -gg -sfrag -suid -out c:\<path+wxs_file_name_to_output> 

here sample output command above:

<component id="exactadatabaseaccess.dll" guid="{96f922a0-38c8-4b58-9e3b-e6b0c24ee09d}">     <class id="{e5cf8a66-aa42-432f-a036-97a3fc7e6ebc}" context="inprocserver32" description="exactadatabaseaccess.databaseaccessobj" threadingmodel="both" foreignserver="mscoree.dll">         <progid id="exactadatabaseaccess.databaseaccessobj" description="exactadatabaseaccess.databaseaccessobj" />     </class>     <file id="exactadatabaseaccess.dll" keypath="yes" source="$(var.basepath)\exactadatabaseaccess.dll" />     <registryvalue root="hkcr" key="clsid\{e5cf8a66-aa42-432f-a036-97a3fc7e6ebc}\implemented categories\{62c8fe65-4ebb-45e7-b440-6e39b2cdbf29}" value="" type="string" action="write" />     <registryvalue root="hkcr" key="clsid\{e5cf8a66-aa42-432f-a036-97a3fc7e6ebc}\inprocserver32\5.5.6.8" name="class" value="exactadatabaseaccess.databaseaccessobj" type="string" action="write" />     <registryvalue root="hkcr" key="clsid\{e5cf8a66-aa42-432f-a036-97a3fc7e6ebc}\inprocserver32\5.5.6.8" name="assembly" value="exactadatabaseaccess, version=5.5.6.8, culture=neutral, publickeytoken=null" type="string" action="write" />     <registryvalue root="hkcr" key="clsid\{e5cf8a66-aa42-432f-a036-97a3fc7e6ebc}\inprocserver32\5.5.6.8" name="runtimeversion" value="v2.0.50727" type="string" action="write" />     <registryvalue root="hkcr" key="clsid\{e5cf8a66-aa42-432f-a036-97a3fc7e6ebc}\inprocserver32\5.5.6.8" name="codebase" value="file:///[#exactadatabaseaccess.dll]" type="string" action="write" />     <registryvalue root="hkcr" key="clsid\{e5cf8a66-aa42-432f-a036-97a3fc7e6ebc}\inprocserver32" name="class" value="exactadatabaseaccess.databaseaccessobj" type="string" action="write" />     <registryvalue root="hkcr" key="clsid\{e5cf8a66-aa42-432f-a036-97a3fc7e6ebc}\inprocserver32" name="assembly" value="exactadatabaseaccess, version=5.5.6.8, culture=neutral, publickeytoken=null" type="string" action="write" />     <registryvalue root="hkcr" key="clsid\{e5cf8a66-aa42-432f-a036-97a3fc7e6ebc}\inprocserver32" name="runtimeversion" value="v2.0.50727" type="string" action="write" />     <registryvalue root="hkcr" key="clsid\{e5cf8a66-aa42-432f-a036-97a3fc7e6ebc}\inprocserver32" name="codebase" value="file:///[#exactadatabaseaccess.dll]" type="string" action="write" /> </component> 

basically heat command generates wxs file above component in it. need include component or component group in main installer. create registry entries instead of running regasm. uninstall remove these registry entries.

here how might include in main installer:

<feature id="productfeature" title="exactasmallpick" level="1">     <componentref id="exactadatabaseaccess.dll"/> </feature> 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -