質問

I am using WIX Installer in which i have a custom action as below.

 <CustomAction Id="ConfigureBiodentifyServer" FileKey="Biodentify.InstallUtil.exe" Execute="deferred" ExeCommand="/configurebiodentify /metadata=&quot;DefaultSetup.xml&quot; /iskiosk=&quot;false&quot;/databaseType=&quot;SQLServer&quot; /sqlserver=&quot;[$(var.SqlServerName)]&quot; /sqluser=&quot;&quot; /sqlpw=&quot;&quot; /domainName=&quot;[$(var.ComputerDomain)]&quot; /domainPk=&quot;[$(var.DomainPk)]&quot; " Impersonate="yes"  Return="check" />


<InstallExecuteSequence><Custom Action="ConfigureBiodentifyServer" After="StartServices">NOT Installed And $(var.InstallType) = "SERVER" </Custom>  </InstallExecuteSequence>

But the ExeCommand is giving error when i installed my Installer?

役に立ちましたか?

解決

There are several levels of refactoring you should be considering. First, you are calling InstallUtil which means you are calling an Installer class custom action. This custom action should be refactored to WiX Deployment Tools Foundation (DTF) to take advantage of a better hosting pattern ( for example you can Get/Set Windows Installer properties instead of passing command line arguments ).

Also WiX has SQL extensions to handle SQL Scripts so you might be reinventing the wheel here.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top