Checking for SMO?

I was eavesdropping on a conversation between SQL Server MVPs Bill Graziano, Hilary Cotter, and Microsoft guru Gert Drapers.  Bill wanted to know if anyone had written some client-side code that tested for the presence of SMO on a local machine.

Hilary suggested this nice bit of VBScript:

on error resume next
Set BillRulez=
if err.number<> 0 then
wscript.echo "not installed"
end if

Gert took another approach by checking if the MSI Package is installed:

Microsoft SQL Server Management Objects Collection
Product code: \{C2BB86C1-3548-4648-A1B5-7F604D631512\}
Product state: (5) Installed.
Package code: \{4FEC8720-9D49-400C-9848-318667D06FE8\}

Hope this helps!


Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.