0
I recently installed SSMS 2016 on my windows 7 machine. When I view a directory of .sql files, I notice that they all have a text file icon image for them and the file type is simply "SQL File". When I right click and choose Open With -> Choose Default Program, SSMS is not in the list. Below is a screen shot of what I see:
When I expand Other Programs, the below is what is shown:
Since I don't see SSMS listed, I choose to browse. Since this is SSMS 2016, I browse to "C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\Ssms.exe". However, once I choose that, it takes me back to the window seen in the above screen shot, and SSMS is not listed as an option. I have tried different programs to try and clear any file associations with .sql and no luck yet. Right now, if I double click a .sql file, it will open in Notepad (probably because I accidentally choose it from the open with window by accident at some point).
Anybody have any ideas how to get this associated with SSMS?
If you expand "other programs" which programs are listed? – Ramhound – 2017-02-06T22:48:05.170
@Ramhound, I have edited the question to show a screenshot of the other programs. – Eric R. – 2017-02-06T23:00:40.370
ftype followed by assoc should do the trick. – DavidPostill – 2017-02-06T23:20:36.430
@DavidPostill, can you provide an example using those commands? I have tried and no dice so far, not sure if I am entering something wrong perhaps? – Eric R. – 2017-02-07T20:09:42.513
ftype sqlfile="C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\Ssms.exe" "%1"
followed byassoc .sql=sqlfile
– DavidPostill – 2017-02-07T22:18:38.870Thanks for the suggestion, I entered that in and rebooted, but nothing has changed. – Eric R. – 2017-02-09T19:11:30.630