Install Sql Server 2012 Express Programmatically
I work on Setup application to install all requirement for my WPF product, one of the requirement is SQL Server 2012 Express, the code below is to install it after I generate the c
Solution 1:
The ProcessStartInfo requires the FileName property to be valid. Your code above doesn't set it but pass everything as Arguments.
Probably you need to separate the command line in two parts. The Executable to run and the arguments to pass
if (os64)
{
fileName = string.Format("{0}\SQLServer\sql64\setup.exe", setupFolder);
commandLine = string.Format(@"PCUSOURCE={0}\SQLServer\sql64 /SAPWD=""p@ssw0rd"" /CONFIGURATIONFILE={0}\SQLServer\ConfigurationFile64.ini /HIDECONSOLE", setupFolder);
}
else
{
// Same for 32 bit
.....
}
....
startInfo.FileName = fileName;
....
Post a Comment for "Install Sql Server 2012 Express Programmatically"