Chad Crawford (3/6/2009)
Yes, that is what I would like to do - have it open in the SSMS that is already running. Right now it opens a new SSMS everytime I double-click a .sql file and it is much more difficult to manage my open files that way - particularly when they are related in some way. It is much easier to go down a list of tabs than have to ALT-TAB over. I've done some research and found people who have it working that way, I'm not sure why mine isn't... I can get it to work by dragging from Explorer to SSMS, but old habit die hard, and I keep forgetting.Thanks,
Chad
My system works as you want it to.
What happens when you double-click a file in Explorer is controlled by the following registry keys:
HKEY_CLASSES_ROOT\sqlwb.sql.9.0
HKEY_CLASSES_ROOT\.sql
On my system these keys are configured as follows:
[HKEY_CLASSES_ROOT\.sql]
"PerceivedType"="text"
@="sqlwb.sql.9.0"
[HKEY_CLASSES_ROOT\.sql\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"
[HKEY_CLASSES_ROOT\sqlwb.sql.9.0]
@="Microsoft SQL Server Query File"
[HKEY_CLASSES_ROOT\sqlwb.sql.9.0\DefaultIcon]
@="c:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\VSShell\\Common7\\IDE\\ssms.exe,-10000"
[HKEY_CLASSES_ROOT\sqlwb.sql.9.0\Shell]
[HKEY_CLASSES_ROOT\sqlwb.sql.9.0\Shell\Open]
[HKEY_CLASSES_ROOT\sqlwb.sql.9.0\Shell\Open\Command]
@="\"c:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\VSShell\\Common7\\IDE\\ssms.exe\" /dde"
[HKEY_CLASSES_ROOT\sqlwb.sql.9.0\Shell\Open\ddeexec]
@="Open(\"%1\")"
[HKEY_CLASSES_ROOT\sqlwb.sql.9.0\Shell\Open\ddeexec\application]
@="sqlwb.9.0"
[HKEY_CLASSES_ROOT\sqlwb.sql.9.0\Shell\Open\ddeexec\topic]
@="system"