Our installation needs to install SQLExpress under certain conditions, and unfortunately we don't know what those condtions are until the user has already gotten through the installation, so we can't run it ahead of time through the setup.exe. After much experimentation I got an ExeCommand custom action hooked up to the "Finish" button of the ExitDialog page which runs the SQLExpress installer's setup.exe after our own msi has finished.
This worked perfectly until people started trying to run the installation remotely over a mapped network drive, at which point whenever they hit "Finish" with the Sql installation box checked they'd get "Error 1315: Unable to write to the specified folder: E:\Install\SQLEXPRESS\." and when they hit okay instead of exiting it goes back to the final dialog page instead of exiting. Since when I try double-clicking the setup.exe file at the same location I get a "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item." error I'm sure there's no way to get the SQLExpress installation to work under these conditions, but I'd like to be able to have it fail gracefully. Some research has indicated that the Publish Event "SetTargetPath" is the problem, and if I remove it then the error goes away, but the SQLExpress installation is no longer successfully run when the installer is run from a local location either. Is there anyway to get rid of the error with SetTargetPath or replace it with something else that will work locally but fail silently remotely? Here's the relevant bits of code: The custom action to actually run the setup.exe <CustomAction Id="InstallSqlExpress" Directory="SQLEXPRESSDIR" ExeCommand='[SQLEXPRESSDIR]setup.exe -q /morebootchk /qb reboot=ReallySuppress addlocal=all instancename=OURNAMESPACE SCCCHECKLEVEL=IncompatibleComponents:1;MDAC25Version:0 ERRORREPORTING=1 SQLAUTOSTART=1 SAPWD="%1!s!" DISABLENETWORKPROTOCOLS=0 /l*v "%2!s!"' Return="asyncNoWait" /> And the custom actions to set the location of the setup.exe (Using my own custom action was the only way I could find to reference a directory above the one which our own installer was running from.) <CustomAction Id="SetSqlExpressDir" Execute="immediate" BinaryKey="mofc.dll" DllEntry="SetSqlExpressDir" /> <CustomAction Id="SetSqlExpressDir.SetProperty" Return="check" Property="SetSqlExpressDir" Value="[SOURCEDIR]" /> In the InstallUISequence we schedule two of the above actions: <Custom Action="SetSqlExpressDir.SetProperty" Before="ExecuteAction">NOT Installed</Custom> >Custom Action="SetSqlExpressDir" After="SetSqlExpressDir.SetProperty">NOT Installed</Custom> And in the ExitDialog we call the first CA when the Finish button is pressed: <Control Id="Finish" Type="PushButton" X="246" Y="242" Width="56" Height="17" Default="yes" Cancel="yes" Text="[ButtonText_Finish]"> <Publish Event="SetTargetPath" Value="SQLEXPRESSDIR">1</Publish> <Publish Event="DoAction" Value="InstallSqlExpress"><![CDATA[(NOT Installed) AND InstallSqlExpressCheck AND (GROUP = 1) AND NOT OURNAMESPACELOCATION]]></Publish> <Publish Event="EndDialog" Value="Return">1</Publish> </Control> If the SetTargetPath event is removed then when we try to run it locally clicking Finish causes it to exit properly but the SQLExpress setup isn't run and the log shows: Action 6:50:30: ExitDialog. Dialog created MSI (c) (83:CD) [06:52:26:459]: Doing action: InstallSqlExpress Action 6:52:26: InstallSqlExpress. Action start 6:52:26: InstallSqlExpress. Action ended 6:52:26: ExitDialog. Return value 1. Action ended 6:52:26: INSTALL. Return value 1. Action ended 6:52:26: InstallSqlExpress. Return value 1631. Thanks! ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users