@"configuration/appSettings/" +
@"add[@key=’connectionstring’]");
if(connectionNode!=null)
{
connectionNode.Attributes["value"].Value =
connectionstring;
doc.Save( stateSaver["target"].ToString()+
@"bin\Customer.exe.config");
EventLog.WriteEntry("SetupDB",
"Configuration file processed...");
}
else
{ // This error will ensure installation
// is uncomplete...
throw new
InstallException(
"Configuration file had no node " +
"declared for connection string.");
}
// Run the scripts
DataBaseInstaller dbInstall =null;
if(TrustedConnection)
{
文章来源于领测软件测试网 https://www.ltesting.net/