Tim
If _SQLServer.Settings.DefaultFile.Length > 0 Then lcReturn = _SQLServer.Settings.DefaultFileElse lcReturn = _SQLServer.Information.MasterDBPathEnd If
The _SQLServer is a Microsoft.SqlServer.Management.Smo.Server object. The Settings.DefaultFile is the default location for the data set by the install of SQL Server. The Information.MasterDbPath is the path that you can specify within the server properties in SQL Server Management Studio. So, it always places the .mdf files within the default database location. If you need to change that, you'll need to change the source code. In the DatabaseMigrator class, it's either going to be the GetDataFilePath() method or the CreateSmoDataFile() method.