Reputation:
I have an installer that deploys web services to IIS. After this has finshed a custom action fires that updates the database with the scripts required by the webservices. The scripts are currently deploying to IIS aswell because they are part of the .net project. How can I configure the installation process so the scripts arn't part of the project and get un-packed from the MSI so my custom action can access them?
Upvotes: 2
Views: 695
Reputation: 12489
If you are using the standard Visual Studio setup projects do this:
Your files will now be output alongside your MSI so will be available at any time.
Upvotes: 2
Reputation: 7963
Using WIX, sorry no clue as to what you are using. I would create a
<Binary Id="webServiceScript.sql" src="[DirectoryToFile]\webServiceDataScript.sql" />
After setup a CA to run the script
<CustomAction Id="CallCmd" Value="[Path_to_Exe_Folder][Your_EXE_TO_RUN_SCRIPT_HERE]" />
<CustomAction Id="RunCmd" ExeCommand="webServiceScript.sql" BinaryKey="webServiceScript.sql" Return="Ignore" />
Then just Setup the Installation Sequence
<InstallExecuteSequence>
<Custom Action="CallCmd" Before="InstallFinalize" />
<Custom Action="RunCmd" After="CallCmd" />
</InstallExecuteSequence>
Upvotes: 0