Hi all,
I'm currently finishing my app and I'm busy with the creation of a MSI
package (via Visual Studio) so users can install the app. My app uses an own
event log entry in the event viewer. During the installation of my app, this
entry needs to be created so possible errors can be logged. The code to
create such an entry I allready have. I now only need a way to run that code
during the setup.
While that code is being run, I also need to attach my database file to the
SQL Server engine (sp_attach_db <db-name> <.mdf-file> <.log-file>. Normally
this is done via SQLCMD or any other tools. Is it possible to run this SQL
command with C# code during the setup?
Does anybody have an idea how i can do these things?
The complete app and setup project is made with VS 2005 RC1 and SQL Server
2005 (Express).