3

I have some files on my system (extension .sublime-package). These files are nothing but a .zip with a different file extension. I can currently browse them by renaming the file, then double clicking to open with the explorer zip viewer.

Is there something I can enter in the "open with" dialog to persuade windows to open the original files with its default zip viewer?

Eric
  • 425
  • 2
  • 7
  • 18
  • When you double-click those files what normally happens? Are they associated with Sublime Text? If not do you want to associate them by default with the Compressed Folders feature? – Karan Jun 07 '15 at 21:40
  • An open with dialog appears; no, they are not; yes, i do. – Eric Jun 07 '15 at 22:09

1 Answers1

2

The terms to look for are

  • associate
  • CompressedFolder

An equivalent question was asked in Can you configure Windows to open JAR files like ZIP files without a 3rd party tool?, using this command for .jar files:

assoc .jar=CompressedFolder

from the command-line, using elevated privileges since it updates the registry. You could use the same method for associating the .sublime-package file type with CompressedFolder:

assoc .sublime-package=CompressedFolder

Microsoft documents the assoc program in several places, e.g., How to Use the Assoc Command to Change File Associations . It has been available since Windows 2000, at least.

In Associate .zip extension to which Windows 7 program?, the answer points to a page containing registry fixes (not what you need), but providing an illustration of what is stored in the registry. For zip-files, it updates several keys in HKEY_CLASSES_ROOT\CompressedFolder.

Thomas Dickey
  • 8,632
  • 3
  • 22
  • 31