public override void Install(IDictionary stateSaver) { #if ADD_DB_TO_SQL_SERVER_DATA //var targetdir = this.Context.Parameters["assemblypath"]; //Debug.Assert(targetdir != null); //string path = Path.Combine(Path.GetPathRoot(targetdir), DBINSTALLPATH); #else //INSTALL ON SYSTEM DRIVE string path = Path.Combine(Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFolder.System)), DBINSTALLPATH); #endif try { if (ClientDataAccess.TestConnection() != null) { string sql = string.Format(Resources.PTFLocalInstallScript, path); ClientDataAccess.SetupDatabase(path, sql); } } catch (Exception ex) { ex.ShowDialog(); } finally { base.Install(stateSaver); } }