Zag Gol
Zag Gol

Reputation: 1076

Batch file only launches one program at a time

I am trying to launch SQL Server from a batch file followed by a specific Visual Studio solution.

This is the batch file code:

@echo off

"C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe -s SBOSQL\SBOINST1 -u sa -p [PASSWORD]

"E:\Projects\comp.sln"

exit

When I run the batch file, Windows only launches SQL Server. When I close SQL Server, it then launches Visual Studio.

Upvotes: 0

Views: 41

Answers (1)

Mathias R. Jessen
Mathias R. Jessen

Reputation: 174825

Use the Start command to launch a new process and then return immediately:

start "" "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" -s SBOSQL\SBOINST1 -u sa -p [PASSWORD]

start "" "E:\Projects\comp.sln"

first argument is the window title (hence the empty string)

Upvotes: 4

Related Questions