My question is if user needs to attach the databases to the instance of server manually before being able to use the application?
I have added the mdf file to my Setup project. It installs and copies the file to application folder. I donot know if the file needs to be attached or there is a way that application could do it automatically (attach to MyComputer\SQLExpress)
Thanks
Since your script already copies the files to the destination folder, you can use the sp_attach_db procedure (http://msdn.microsoft.com/en-us/library/ms179877(v=sql.100).aspx) or even the CREATE DATABASE command with FOR ATTACH informing the file names.