processInfo.WindowStyle=ProcessWindowStyle.Normal;
// Get the name of the file from the assembly’s
// embedded resource.
if(config !=null)
{
fileName = config.SelectSingleNode(
"configroot/Files/DataBase/Add/File").
Attributes["name"].Value;
}
else{
//Customized message..
throw new InstallException(
"Configuration for database file " +
"creation missing.");
}
//Get arguments
processInfo.Arguments=
GetCommonProcessArguments(fileName,"master");
EventLog.WriteEntry("DatabaseInstaller",
processInfo.Arguments);
PopulateDatabaseNamePlaceHolder(
GetFullPath(fileName));
Process osql = Process.Start(processInfo);
//Wait till it is done...
文章来源于领测软件测试网 https://www.ltesting.net/