Using RegAsm is a huge part of the reason your batch file was so unreliable. It is called Self-Registration. You should very seriously consider not doing that. You should instead be very explicit as to exactly what settings you need to register your components and author that into your MSI.
You can use utilities such as heat.exe to extract those for your first time to get you started... -----Original Message----- From: salever.lee [mailto:salever....@gmail.com] Sent: Monday, November 16, 2009 11:22 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Example Help Needed -review Hi, You can use "Quiet Execution Custom Action" to finish register files. I don't whether you can read Chinses or not, but there are some notes in my blog in Chinses. http://blog.csdn.net/salever/archive/2009/11/02/4758313.aspx I hope it's useful. For example, execute a cmd line during msi installation: <Property Id="QtExecCmdLine" Value="command line to run"/> <CustomAction Id="QtExecExample" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="immediate" Return="check"/> <InstallExecuteSequence> <Custom Action="QtExecExample" After="TheActionYouWantItAfter"/> </InstallExecuteSequence> Another exmple, execute a command using another application: <CustomAction Id="QtExecDeferredExampleWithProperty_Cmd" Property="QtExecDeferredExampleWithProperty" Value=""[#MyExecutable.exe]"" Execute="immediate"/> <CustomAction Id="QtExecDeferredExampleWithProperty" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no"/> <InstallExecuteSequence> <Custom Action="QtExecDeferredExampleWithProperty_Cmd" After="CostFinalize"/> <Custom Action="QtExecDeferredExampleWithProperty" After="TheActionYouWantItAfter"/> </InstallExecuteSequence Please remember that the Value should be quoted. In wix document , there are more examples. Good luck. 2009-11-17 salever.lee 发件人: Elene Sanston 发送时间: 2009-11-17 12:49:11 收件人: wix-users 抄送: 主题: Re: [WiX-users] Example Help Needed -review Thank you so much. I think it helped. Below is the code I have modified from your sample but I need to register 4 files with regasm like I am doing in the batch file: %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe "%SYSTEMROOT%\system32\Hyland\SigDef\SDEpicAnalysis.dll" /codebase %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe "%SYSTEMROOT%\system32\Hyland\SigDef\SDEpicSigning.dll" /codebase %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe "%SYSTEMROOT%\system32\Hyland\SigDef\Hyland.Types.dll" /codebase %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe "C:\Program Files\EpicSys\v7.6\Shared Files\OBEpicViewer76.dll" /codebase --=====My Code=====-- <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product Id="990BC821-8D22-4D69-8210-4F1BA643217A" Name="WixExample" Language="1033" Version="1.0.0.0" Manufacturer="WixExample" UpgradeCode="B7D2CE34-C221-4F55-B13F-700884B975A7"> <Package InstallerVersion="200" Compressed="yes" /> <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" /> <!-- make sure that .netframework 3.5 is installed --> <Condition Message="This application requires .NET Framework 3.5. Please install the .NET Framework then run this installer again."><![CDATA[Installed OR NETFRAMEWORK35]]></Condition> <!-- administrator to install --> <Condition Message="You need to be an administrator to install this product."> Privileged </Condition> <!-- Directory --> <!-- set directory to Windows/System32--> <SetDirectory Id="SYSTEMFOLDER" Value="[SystemFolder]" /> <SetDirectory Id="EPICCDRIVE" Value="C:\Program Files\EpicSys\v7.6\Shared Files" /> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="SYSTEMFOLDER"> <!-- replace WixExample to you folder name --> <Directory Id="INSTALLLOCATION" Name="Hyland"> <Directory Id="INSTALLLOCATION1" Name="Scan" /> <Directory Id="INSTALLLOCATION2" Name="SigDef" /> </Directory> </Directory> <Directory Id="EPICCDRIVE" /> </Directory> <!-- registry entry --> <DirectoryRef Id="TARGETDIR"> <Component Id="RegistryEntries" Guid="F8E77547-63A9-4D9C-A5D7-52F79393B7EF"> <RegistryKey Root="HKLM" Key="Software\ACEpicScanControl\Debug" Action="createAndRemoveOnUninstall"> <RegistryValue Type="integer" Name="WriteLog" Value="0" KeyPath="yes" /> <RegistryValue Type="integer" Value="0" KeyPath="yes" Name="showoutput" /> <RegistryValue KeyPath="yes" Name="showinput" Type="integer" Value="0" /> </RegistryKey> <RegistryKey Root="HKLM" Key="Software\ACEpicScanControl\Diskgroup" Action="createAndRemoveOnUninstall"> <RegistryValue Type="string" Name="Path" Value="" KeyPath="yes" /> </RegistryKey> <RegistryKey Root="HKLM" Key="Software\ACEpicScanControl\Mapping" Action="createAndRemoveOnUninstall"> <RegistryValue Type="string" Name="FilePath" Value="TBD\\keywordmapping.txt" KeyPath="yes" /> </RegistryKey> <RegistryKey Root="HKLM" Key="Software\ACEpicScanControl\Scan" Action="createAndRemoveOnUninstall"> <RegistryValue Type="integer" Name="LowTwainMode" Value="1" KeyPath="yes" /> </RegistryKey> <RegistryKey Root="HKLM" Key="Software\ACEpicScanControl\Init" Action="createAndRemoveOnUninstall"> <RegistryValue Type="integer" Name="UseServices" Value="1" KeyPath="yes" /> <RegistryValue Type="string" Value="" KeyPath="yes" Name="ServiceURL" /> <RegistryValue Type="string" Value="" KeyPath="yes" Name="ServiceDatasource" /> <RegistryValue Type="integer" Value="1" KeyPath="yes" Name="AutoSaveRotation" /> <RegistryValue Type="integer" Value="0" KeyPath="yes" Name="GeneralHKCU" /> <RegistryValue Type="integer" Value="1" KeyPath="yes" Name="ScanHKCU" /> <RegistryValue KeyPath="yes" Name="showinput" Type="integer" Value="0" /> </RegistryKey> <RegistryKey Root="HKLM" Key="Software\Hyland\DMDesktop\RemoteServers" Action="createAndRemoveOnUninstall"> <RegistryValue Type="string" Value="http://obprd.meriter.com/appserver" KeyPath="yes" Name="PRD" /> <RegistryValue Type="string" Value="OnBase_Prod" KeyPath="yes" Name="PRD_datasource" /> <RegistryValue Type="string" Value="http://obtest.meriter.com/appserver" KeyPath="yes" Name="TST4" /> <RegistryValue Type="string" Value="OnBase_DEV" KeyPath="yes" Name="TST4_datasource" /> </RegistryKey> </Component> </DirectoryRef> <!-- your install source files --> <DirectoryRef Id="INSTALLLOCATION2"> <Component Id="Component1" Guid="F38F12CB-72D1-4DB2-868E-72E54DCBE351"> <File Id="AxInterop.OBXAltViewerLib.dll" Source="Epic08_Files\SigDef\AxInterop.OBXAltViewerLib.dll" /> </Component> <Component Id="Component2" Guid="47C21482-20AD-4BAA-B392-17FB919EC591"> <File Id="Hyland.Types.dll" Source="Epic08_Files\SigDef\Hyland.Types.dll" /> </Component> <Component Id="Component3" Guid="EFEC6DFF-244A-468A-9591-0256D37FCEDE"> <File Id="Interop.EHIMIScanSig75.dll" Source="Epic08_Files\SigDef\Interop.EHIMIScanSig75.dll" /> </Component> <Component Id="Component4" Guid="EFEC6DFF-244A-468A-9591-0256D37FCEDE"> <File Id="Interop.EHIMIScanSig76.dll" Source="Epic08_Files\SigDef\Interop.EHIMIScanSig76.dll" /> </Component> <Component Id="Component5" Guid="EFEC6DFF-244A-468A-9591-0256D37FCEDE"> <File Id="Interop.EHIMIScanSig77.dll" Source="Epic08_Files\SigDef\Interop.EHIMIScanSig77.dll" /> </Component> <Component Id="Component6" Guid="EFEC6DFF-244A-468A-9591-0256D37FCEDE"> <File Id="Interop.OBXAltViewerLib.dll" Source="Epic08_Files\SigDef\Interop.OBXAltViewerLib.dll" /> </Component> <Component Id="Component7" Guid="EFEC6DFF-244A-468A-9591-0256D37FCEDE"> <File Id="Interop.VBA.dll" Source="Epic08_Files\SigDef\Interop.VBA.dll" /> </Component> <Component Id="Component8" Guid="EFEC6DFF-244A-468A-9591-0256D37FCEDE"> <File Id="SDEpicAnalysis.dll" Source="Epic08_Files\SigDef\SDEpicAnalysis.dll" /> </Component> <Component Id="Component9" Guid="EFEC6DFF-244A-468A-9591-0256D37FCEDE"> <File Id="SDEpicSigning.dll" Source="Epic08_Files\SigDef\SDEpicSigning.dll" /> </Component> </DirectoryRef> <DirectoryRef Id="INSTALLLOCATION1"> <Component Id="Component10" Guid="AE40CC4D-50DC-4E20-9509-176D7E91E2C8"> <File Id="obepicscan76.dll" Source="Epic08_Files\Scan\obepicscan76.dll" SelfRegCost="1" /> </Component> <Component Id="Component11" Guid="4C2EA522-0A78-444D-B9B8-F9D9888F0BDB"> <File Id="obepicscanwrp76.dll" Source="Epic08_Files\Scan\obepicscanwrp76.dll" SelfRegCost="1" /> </Component> </DirectoryRef> <DirectoryRef Id="EPICCDRIVE"> <Component Id="Component12" Guid="65511B44-813F-46D9-948E-EA6C2ECCA618"> <File Id="AxInterop.OBXAltViewerLib.dll" Source="Epic08_Files\Viewer\AxInterop.OBXAltViewerLib.dll" /> </Component> <Component Id="Component13" Guid="65511B44-813F-46D9-948E-EA6C2ECCA618"> <File Id="AxInterop.SHDocVw.dll" Source="Epic08_Files\Viewer\AxInterop.SHDocVw.dll" /> </Component> <Component Id="Component14" Guid="65511B44-813F-46D9-948E-EA6C2ECCA618"> <File Id="Hyland.Types.dll" Source="Epic08_Files\Viewer\Hyland.Types.dll" /> </Component> <Component Id="Component15" Guid="65511B44-813F-46D9-948E-EA6C2ECCA618"> <File Id="Interop.EACMediaInterfaces76.dll" Source="Epic08_Files\Viewer\Interop.EACMediaInterfaces76.dll" /> </Component> <Component Id="Component16" Guid="65511B44-813F-46D9-948E-EA6C2ECCA618"> <File Id="Interop.EDInterfaces76.dll" Source="Epic08_Files\Viewer\Interop.EDInterfaces76.dll" /> </Component> <Component Id="Component17" Guid="65511B44-813F-46D9-948E-EA6C2ECCA618"> <File Id="Interop.OBXAltViewerLib.dll" Source="Epic08_Files\Viewer\Interop.OBXAltViewerLib.dll" /> </Component> <Component Id="Component18" Guid="65511B44-813F-46D9-948E-EA6C2ECCA618"> <File Id="Interop.SHDocVw.dll" Source="Epic08_Files\Viewer\Interop.SHDocVw.dll" /> </Component> <Component Id="Component19" Guid="65511B44-813F-46D9-948E-EA6C2ECCA618"> <File Id="OBEpicViewer76.dll" Source="Epic08_Files\Viewer\OBEpicViewer76.dll" /> </Component> <Component Id="Component20" Guid="65511B44-813F-46D9-948E-EA6C2ECCA618"> <File Id="OBXAltViewer.ocx" Source="Epic08_Files\Viewer\OBXAltViewer.ocx" /> </Component> </DirectoryRef> <DirectoryRef Id="SYSTEMFOLDER"> <Component Id="Component21" Guid="D0268C54-823B-465C-8D3D-0CFAE8B5BB3B"> <File Id="dmimage_alt.dll" Source="Epic08_Files\Common\dmimage_alt.dll" /> </Component> <Component Id="Component22" Guid="D0268C54-823B-465C-8D3D-0CFAE8B5BB3B"> <File Id="dmlocale_alt.dll" Source="Epic08_Files\Common\dmlocale_alt.dll" /> </Component> <Component Id="Component23" Guid="D0268C54-823B-465C-8D3D-0CFAE8B5BB3B"> <File Id="OBXAltViewer.ocx" Source="Epic08_Files\Common\OBXAltViewer.ocx" SelfRegCost="1" /> </Component> <Component Id="Component24" Guid="D0268C54-823B-465C-8D3D-0CFAE8B5BB3B"> <File Id="snbd17dm.dll" Source="Epic08_Files\Common\snbd17dm.dll" /> </Component> </DirectoryRef> <Feature Id="ProductFeature" Title="WixExample" Level="1"> <ComponentRef Id="RegistryEntries" /> <ComponentRef Id="Component1" /> <ComponentRef Id="Component2" /> <ComponentRef Id="Component3" /> <ComponentRef Id="Component4" /> <ComponentRef Id="Component5" /> <ComponentRef Id="Component6" /> <ComponentRef Id="Component7" /> <ComponentRef Id="Component8" /> <ComponentRef Id="Component9" /> <ComponentRef Id="Component10" /> <ComponentRef Id="Component11" /> <ComponentRef Id="Component12" /> <ComponentRef Id="Component13" /> <ComponentRef Id="Component14" /> <ComponentRef Id="Component15" /> <ComponentRef Id="Component16" /> <ComponentRef Id="Component17" /> <ComponentRef Id="Component18" /> <ComponentRef Id="Component19" /> <ComponentRef Id="Component20" /> <ComponentRef Id="Component21" /> <ComponentRef Id="Component22" /> <ComponentRef Id="Component23" /> <ComponentRef Id="Component24" /> </Feature> <UI /> </Product> </Wix> ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users