Sublime Forum

ST3: File association doesn't work properly in Windows 7

#1

Hi,

Version: Sublime Text build 3007, Portable Windows 64 bit
OS: Windows 7 Enterprise

I cannot seem to get file association to work in the ST3 beta. ST2 worked fine (also portable). I removed ST2 to make sure Windows didn’t think it was a mere duplicate but still when I select “Open with…” and then browse for ST3’s sublime_text.exe it doesn’t show up in the list of applications to choose from. So far I’ve had to use the Open dialog or drag n’ drop files to ST3 to open them.

Thanks,
Eric

0 Likes

#2

Having the same issue. Did you figure it out?

Thanks,
Jean

Jean Moniatte
UGAL
jean@ugal.com
ugal.com

0 Likes

#3

The problem can easily be solved by editing the Windows Registry.

Just open regedit (Open the startmenu and enter “regedit.exe”), go to:
HKEY_CLASSES_ROOT\Applications\sublime_text.exe\shell\open\command
And replace the (Default) value with the corresponding new path. In my case that would be:
“C:\Program Files\Sublime Text 3\sublime_text.exe” “%1”

I hope this was helpful.

Best regards,
rynti

0 Likes

#4

[quote=“rynti”]The problem can easily be solved by editing the Windows Registry.

Just open regedit (Open the startmenu and enter “regedit.exe”), go to:
HKEY_CLASSES_ROOT\Applications\sublime_text.exe\shell\open\command
And replace the (Default) value with the corresponding new path. In my case that would be:
“C:\Program Files\Sublime Text 3\sublime_text.exe” “%1”

I hope this was helpful.

Best regards,
rynti[/quote]

Thanks for the suggestion rynti. This doesn’t fully solve the problem though, this would require me to first register the file types using ST 2 and then manually switch them to ST 3. The root issue is that Windows doesn’t seem to register ST 3 as a valid application for file association so if there is no association (for example a new Windows install) then Windows will blatantly ignore me selecting Sublime Text.exe (in ST 3 folder).

I should probably try to register my files with ST 2 and then do this trick though…

0 Likes

#5

There is probably more in the registry pointing to ST2.

Following workflow helped (ST 2 was previously registered):

  • Rename sublime_text.exe from ST 2 (e.g. to sublime_text2.exe) or delete it
  • Run CCleaner Registry Cleaner (might require multiple runs)
  • Register ST 3 sublime_text.exe as file associations
0 Likes

#6

I have a similar issue. I cannot set ST3 as the default program for some files.

When I right click on a file, go to Open With, then “Choose Default Program,” from there I click Browse, go to my Sublime Text 3 directory and select “sublime_text.exe” after pressing the “Open” button in that dialog, Windows will not show Sublime Text as an option in the “Open With” dialog, and it reverts back to what ever was set previously. (Notepad++ in my case.)

Windows version:
Windows 7 Enterprise 64bit SP1
ST3: Build 3033

I view this as a bug in ST3, and something that should be fixed. A registry hack doesn’t exactly fit with my expectations.

0 Likes

#7

Hi,

uninstall ST2, then run a CCleaner registry check and all should be fine

Regards,

0 Likes

#8

FIX:
Open Regedit
Navigate to HKEY_CLASSES_ROOT\Applications\sublime_text.exe\shell\open\command

The Data field in this string key is probably mapped to the old version.
Change this to the correct filepath

C:\Program Files\Sublime Text 3\sublime_text.exe

And all is golden!

0 Likes

#9

Previous post works should anyone be stuck like me.

I’m guessing that when you select the exe as the program, it’s finding the path to be wrong and is ignoring the selection.

0 Likes

#10

[quote=“bjamesatwork”]FIX:
Open Regedit
Navigate to HKEY_CLASSES_ROOT\Applications\sublime_text.exe\shell\open\command

The Data field in this string key is probably mapped to the old version.
Change this to the correct filepath

C:\Program Files\Sublime Text 3\sublime_text.exe

And all is golden![/quote]

worked for me thanks

0 Likes

#11

It works… Thumbs up :smile:

0 Likes