views:

98

answers:

2

Hi everybody,

Please I need help with a script that can help me open the SQL Server Management Studio 2005 from a button in an another interface.

Thanks Roger

+1  A: 

With C#:

using System; 
using System.Diagnostics;

void StartStudio() 
{
      Process proc = new Process();
      proc.StartInfo.FileName = "ssms";
      proc.Start(); 
}
Svetlozar Angelov
Filename = ssms. Really? reference please
gbn
@gbn: Default SS2008 location is: `C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe`
Eric
I'm sorry, we actually talk about 2008, the question is about 2005
Svetlozar Angelov
+2  A: 

sqlwb.exe is SSMS in SQL Server 2005 and it has parameters such as -S etc for Server name, but also has a filename parameter.

At command prompt, run sqlwb /? to get command line usage

gbn