Support external program check

Jun 6, 2011 at 9:28 AM

Hello,

Currently, DNI supports following prerequisites checks: Registry, File, Directory and ProductCode.

How about supporting an external program check (i.e check_sql_server_installed.exe)? In some cases, we have to write a program to check if the software is already installed or not because we could not rely on registry, file, directory .... Is it possible? Please give your ideas.

Thanks in advance.

Coordinator
Jun 8, 2011 at 12:11 AM

The short answer is that it doesn't do it.

Do you have a real world scenario? Checking for whether SQL server is installed is an MSI/Registry/Productcode operation. 

If someone built a feature that does it, I wouldn't say no, but IMHO it's a bad idea.

Jun 8, 2011 at 10:23 AM
Edited Jun 8, 2011 at 10:25 AM

Thank you dblock for your feedback.

Through the article here http://blogs.msdn.com/b/sqlexpress/archive/2006/07/29/faq-detecting-sql-server-2005-using-wmi.aspx , they had recommended we should not use registry to detect SQL Server since MS might change it anytime without warning.

There was a tool named "Bootstrapper Manifest Generator" which supports using external program to check prerequisites. Basically, the tool bases on "exit code" of checking program to determine if the software is already installed or not. The checking program might look like:

public static void Main()

{
bool foo = isExpressInstalled();
if (foo)
{
Environment.Exit(1);
}
else
{
Environment.Exit(0);
}
}