Can you select default editor for file types separate from launch?


lettersquash

Member
Local time
9:49 AM
Posts
44
OS
Windows 11 Pro
I distinctly remember setting default editors for some file types like scripts separately from the associated execution program, but I'm not sure how I did it, if it was in Win 7 or 10 and Microsoft has removed the feature. All I find now in the settings is "default application" for a file type. Has Microsoft dumbed Windoze down again? Maybe registry settings will do it?

Specifically, my AutoHotkey scripts (.ahk) used to be executed by the AutoHotkey executable but any command to edit them loaded them into SciTE4AutoHotkey. However, since I don't see any default editor selection function in Windows, I don't think it's specific to this example.
 
Windows Build/Version
Windows 11 Pro, 22H2, OS build 22621.2715

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo Thinkpad L390 Yoga
    CPU
    Intel Core i7-8565U
    Motherboard
    20NT0019UK
    Memory
    8 GB
    Monitor(s) Displays
    14"
    Hard Drives
    500 GB SSD
Settings>apps>default apps>
For a single file type enter the file type om box and change its default app.

Also, you can also scroll all the way to the bottom of that page and select "choose defaults by file type" to get a list of all file types.
Find your file type in the list and change it from there.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 22631.3447
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 7080
    CPU
    i9-10900 10 core 20 threads
    Motherboard
    DELL 0J37VM
    Memory
    32 gb
    Graphics Card(s)
    none-Intel UHD Graphics 630
    Sound Card
    Integrated Realtek
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1tb Solidigm m.2 +256gb ssd+512 gb usb m.2 sata
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender+MWB Premium
  • Operating System
    Windows 10 Pro 22H2 19045.3930
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 9020
    CPU
    i7-4770
    Memory
    24 gb
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    256 gb Toshiba BG4 M.2 NVE SSB and 1 tb hdd
    PSU
    500w
    Case
    MT
    Cooling
    Dell factory
    Mouse
    Logitech wireless
    Keyboard
    Logitech wired
    Internet Speed
    still not telling
    Browser
    Firefox
    Antivirus
    Defender+MWB Premium
Settings>apps>default apps>
For a single file type enter the file type om box and change its default app.

Also, you can also scroll all the way to the bottom of that page and select "choose defaults by file type" to get a list of all file types.
Find your file type in the list and change it from there.
Sorry, but this isn't the issue, as I explained. That routine changes the "default app", which is the one that launches a file of that file type. There should be at least two default apps (and certainly were in earlier versions of Windows), to say that a particular file is run/launched by one program, but if the Edit command is given, the file is opened with a particular editor. For example, .bas files need to be run by an interpreter program, but should also allow editing in a program chosen by the user. As it stands, my script files (*.ahk) will get run correctly by the interpreter, but only edited in Notepad, whereas I want them edited in SciTE4AutoHotkey or some other like Notepad++.
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo Thinkpad L390 Yoga
    CPU
    Intel Core i7-8565U
    Motherboard
    20NT0019UK
    Memory
    8 GB
    Monitor(s) Displays
    14"
    Hard Drives
    500 GB SSD
Take a look at this, basically currently, you can only select a open with, before there was a open with and also a edit with option, the later you have to manually add in the registry...

 

My Computer

System One

  • OS
    Windows XP/7/8/8.1/10/11, Linux, Android, FreeBSD Unix
    Computer type
    Laptop
    Manufacturer/Model
    Dell XPS 15 9570
    CPU
    Intel® Core™ i7-8750H 8th Gen Processor 2.2Ghz up to 4.1Ghz
    Motherboard
    Dell XPS 15 9570
    Memory
    32GB using 2x16GB modules
    Graphics Card(s)
    Intel UHD 630 & NVIDIA GeForce GTX 1050 Ti with 4GB DDR5
    Sound Card
    Realtek ALC3266-CG
    Monitor(s) Displays
    15.6" 4K Touch UltraHD 3840x2160 made by Sharp
    Screen Resolution
    3840x2160
    Hard Drives
    Toshiba KXG60ZNV1T02 NVMe 1024GB/1TB SSD
    PSU
    Dell XPS 15 9570
    Case
    Dell XPS 15 9570
    Cooling
    Stock
    Keyboard
    Stock
    Mouse
    SwitftPoint ProPoint
    Internet Speed
    Comcast/XFinity 1.44Gbps/42.5Mbps
    Browser
    Microsoft EDGE (Chromium based) & Google Chrome
    Antivirus
    Windows Defender that came with Windows
you could create a context menu entry called "edit with appname" But that would require many entries. I know for a fact that you can change this individually for images - it’s tied to the default “edit” entry.
You can “open with”… But Im not sure if you can edit with different apps per file type
 

My Computer

System One

  • OS
    Windows 11 Pro
You could try and add an "Edit" command under the following Registry key, and set 'your own path to Scite' there; unless you already have Notepad.exe as an entry there, then you can try and change it to SciTE.exe.
Note that if there are any Spaces in the path to your SciTE.exe, then enclose the path in quotes.

Computer\HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell

ahk1.PNG

ahk2.PNG

ref: Change Registry Setting for "Edit This Scipt" - Ask for Help
 

Attachments

  • ahk2.PNG
    ahk2.PNG
    8.2 KB · Views: 1
  • ahk1a.PNG
    ahk1a.PNG
    8.3 KB · Views: 1
Last edited:

My Computer

System One

  • OS
    Windows 11 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    custom
    CPU
    intel i7-8700 (non-K)
    Motherboard
    Asus Z370 TUF Gaming
    Memory
    32Gb
    Graphics Card(s)
    On-board Intel iGPU
    Sound Card
    On-board Realtek
    Hard Drives
    Samsung_SSD_850_EVO
    PSU
    Corsair Rm850X
    Cooling
    All air

best bet will just be to create a main context entry "Edit With..." and have it cascade into subentries. Read in above link.
 

My Computer

System One

  • OS
    Windows 11 Pro
Take a look at this, basically currently, you can only select a open with, before there was a open with and also a edit with option, the later you have to manually add in the registry...

Thanks, that solves the mystery - I began to wonder if I'd imagined it!

Thanks also @dacrone and @das10 for those details on how to do this for various files. I've learned a few things.

I asked the same question on the AutoHotkey forum, and they suggested I reinstall the AutoHotkey IDE (version 2) and its Dash, which allows you to set the editor for scripts. So I did that and it solved the issue without me digging into the registry. I expect it just does the same as the above.
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo Thinkpad L390 Yoga
    CPU
    Intel Core i7-8565U
    Motherboard
    20NT0019UK
    Memory
    8 GB
    Monitor(s) Displays
    14"
    Hard Drives
    500 GB SSD

Latest Support Threads

Back
Top Bottom