Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Adds 'Open in Atom' to context menu in Windows Explorer.
Windows Registry Editor Version 5.00
;
; Adds 'Open in Atom' to context menu (when you right click) in Windows Explorer.
;
; Based on https://github.com/Zren/atom-windows-context-menu. It didn't work
; https://github.com/Zren/atom-windows-context-menu/issues/1.
;
; Save this file to disk with a .reg extension. Replace C:\\Atom\\atom.exe with
; the path to the atom executable on your machine.
;
; Make sure you are running as administrator.
;
; Double click the file and then click yes on the popup.
;
; OR
;
; open a command prompt and type
; C:> regedit path\to\open-w-atom.reg
;
; That's it!
;
; License, MIT
; when you right click a file
[HKEY_CLASSES_ROOT\*\shell\Atom KI ext]
""="Open File in Atom"
"Icon"="C:\\Atom\\atom.exe"
[HKEY_CLASSES_ROOT\*\shell\Atom KI ext\command]
""="C:\\Atom\\atom.exe \"%1\""
; when you right click a folder
[HKEY_CLASSES_ROOT\Directory\shell\Atom KI ext]
""="Open Folder in Atom"
"Icon"="C:\\Atom\\atom.exe"
[HKEY_CLASSES_ROOT\Directory\shell\Atom KI ext\command]
""="C:\\Atom\\atom.exe \"%1\""
; when you right click a folder while holding shift
[HKEY_CLASSES_ROOT\Directory\Background\shell\Atom KI ext]
""="Open Folder in Atom"
"Icon"="C:\\Atom\\atom.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\Atom KI ext\command]
""="C:\\Atom\\atom.exe \"%V\""
; when you right click the background, not on a particular file or folder.
[HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\Atom KI ext]
""="Open Folder in Atom"
"Icon"="C:\\Atom\\atom.exe"
[HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\Atom KI ext\command]
""="C:\\Atom\\atom.exe \"%V\""
Copyright (c) 2014 Kyle Ilantzis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@dustinpoissant

This comment has been minimized.

Show comment Hide comment
@dustinpoissant

dustinpoissant Nov 30, 2016

This is awesome, is there a "remove" script as well?

This is awesome, is there a "remove" script as well?

@framm

This comment has been minimized.

Show comment Hide comment
@framm

framm Dec 15, 2016

A "remove" script would be awesome

framm commented Dec 15, 2016

A "remove" script would be awesome

@tusharkathuria

This comment has been minimized.

Show comment Hide comment
@tusharkathuria

tusharkathuria Dec 30, 2016

Hi, I get following message in alert when I try to click on Open with Atom:
This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel.
Am i doing anything wrong?

Hi, I get following message in alert when I try to click on Open with Atom:
This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel.
Am i doing anything wrong?

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Jan 3, 2017

@tusharkathuria by default atom is installed to C:\Users\{USER_NAME}\AppData\Local\atom where {USER_NAME} is your windows user name. I wonder how this reg script is working since in C:\Atom there is nothing for the most of the installations.

So, if your username is tusharkathuria, the regedit value should be: C:\Users\tusharkathuria\AppData\Local\atom\bin\atom.cmd %1

Edit: in newer versions of Atom, I'm using 1.12.x there is a checkbox for enable/disable this feature in Settings->System, you can access to it by pressing Ctrl + ,

ghost commented Jan 3, 2017

@tusharkathuria by default atom is installed to C:\Users\{USER_NAME}\AppData\Local\atom where {USER_NAME} is your windows user name. I wonder how this reg script is working since in C:\Atom there is nothing for the most of the installations.

So, if your username is tusharkathuria, the regedit value should be: C:\Users\tusharkathuria\AppData\Local\atom\bin\atom.cmd %1

Edit: in newer versions of Atom, I'm using 1.12.x there is a checkbox for enable/disable this feature in Settings->System, you can access to it by pressing Ctrl + ,

@Aleksandern

This comment has been minimized.

Show comment Hide comment
@Aleksandern

Aleksandern Jan 10, 2017

111

@calexHG

This comment has been minimized.

Show comment Hide comment
@calexHG

calexHG Jan 13, 2017

Thanks for the removal tips @codekraft-studio and @Aleksandern.
It seems that doesn't work when trying to remove the old ones, however. CCleaner did the job though.

hmm... strangely, GitHub isn't providing any autocompletion for @username mentions o_o. Maybe that's just how it goes on gists..

calexHG commented Jan 13, 2017

Thanks for the removal tips @codekraft-studio and @Aleksandern.
It seems that doesn't work when trying to remove the old ones, however. CCleaner did the job though.

hmm... strangely, GitHub isn't providing any autocompletion for @username mentions o_o. Maybe that's just how it goes on gists..

@isapir

This comment has been minimized.

Show comment Hide comment
@isapir

isapir Feb 26, 2017

@Aleksandern Awesome :)

isapir commented Feb 26, 2017

@Aleksandern Awesome :)

@hamed-farag

This comment has been minimized.

Show comment Hide comment
@hamed-farag

hamed-farag Mar 3, 2017

@framm @dustinpoissant

Remove One

Windows Registry Editor Version 5.00

;
; Removes 'Open in Atom' from context menu (when you right click) in Windows Explorer.
;
; That's it!
;
; License, MIT

[-HKEY_CLASSES_ROOT\*\shell\Atom KI ext]
[-HKEY_CLASSES_ROOT\*\shell\Atom KI ext\command]
[-HKEY_CLASSES_ROOT\Directory\shell\Atom KI ext]
[-HKEY_CLASSES_ROOT\Directory\shell\Atom KI ext\command]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Atom KI ext]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Atom KI ext\command]
[-HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\Atom KI ext]
[-HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\Atom KI ext\command]

Save file as .reg

@framm @dustinpoissant

Remove One

Windows Registry Editor Version 5.00

;
; Removes 'Open in Atom' from context menu (when you right click) in Windows Explorer.
;
; That's it!
;
; License, MIT

[-HKEY_CLASSES_ROOT\*\shell\Atom KI ext]
[-HKEY_CLASSES_ROOT\*\shell\Atom KI ext\command]
[-HKEY_CLASSES_ROOT\Directory\shell\Atom KI ext]
[-HKEY_CLASSES_ROOT\Directory\shell\Atom KI ext\command]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Atom KI ext]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Atom KI ext\command]
[-HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\Atom KI ext]
[-HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\Atom KI ext\command]

Save file as .reg

@felipebraga

This comment has been minimized.

Show comment Hide comment
@felipebraga

felipebraga Apr 25, 2017

@Aleksandern

That's perfect. Thanks

@Aleksandern

That's perfect. Thanks

@the94air

This comment has been minimized.

Show comment Hide comment
@the94air

the94air May 9, 2017

Thanks @Aleksandern . It is simple as pie 👍

the94air commented May 9, 2017

Thanks @Aleksandern . It is simple as pie 👍

@mpolinowski

This comment has been minimized.

Show comment Hide comment
@mpolinowski

mpolinowski Jun 18, 2017

@Aleksandern

Thanks!

@nguyentrithuc

This comment has been minimized.

Show comment Hide comment
@nguyentrithuc

nguyentrithuc Jul 20, 2017

@Aleksandern Very nice and simple! Thanks.

@Aleksandern Very nice and simple! Thanks.

@dmitriyaa

This comment has been minimized.

Show comment Hide comment
@dmitriyaa

dmitriyaa Aug 10, 2017

@Aleksandern thanks man!

@Aleksandern thanks man!

@Akram1234

This comment has been minimized.

Show comment Hide comment
@Akram1234

Akram1234 Dec 18, 2017

@hamed-farag thanks man !

@hamed-farag thanks man !

@uluQulu

This comment has been minimized.

Show comment Hide comment
@uluQulu

uluQulu Feb 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment