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


lettersquash

Well-known member
Local time
11:50 PM
Posts
48
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 Windows 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 My Computer

At a glance

Windows 11 ProIntel Core i7-8565U8 GB
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 My Computers

  • At a glance

    Windows 11 Pro 25H2 26200.8875i9-10900 10 core 20 threads32 gbnone-Intel UHD Graphics 630
    OS
    Windows 11 Pro 25H2 26200.8875
    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
    2x1tb Solidigm m.2 nvme /External drives 512gb Samsung m.2 sata+2tb Kingston m2.nvme
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    #1 Edge #2 Firefox
    Antivirus
    Defender+MWB Premium
  • At a glance

    Windows 11 Pro 24H2 26200.8875AMD Ryzen 7 6800U32 gbintegrated
    Operating System
    Windows 11 Pro 24H2 26200.8875
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink Mini PC SER5
    CPU
    AMD Ryzen 7 6800U
    Memory
    32 gb
    Graphics card(s)
    integrated
    Sound Card
    integrated
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Crucial nvme
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    still too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender
    Other Info
    System 3 is non compliant Dell 9020 i7-4770/24gb ram Win11 PRO 26200.8875
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 My Computer

At a glance

Windows 11 ProIntel Core i7-8565U8 GB
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 My Computer

At a glance

WindowsXP/7/8/8.1/10/11,Linux,Android,FreeBSD...Intel® Core™ i7-8750H 8th Gen 2.2Ghz up to 4....64GB using 2x32GB CL16 Mushkin redLine modulesIntel UHD 630 & NVIDIA GeForce GTX 1050 Ti wi...
OS
WindowsXP/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 2.2Ghz up to 4.1Ghz
Motherboard
Dell XPS 15 9570
Memory
64GB using 2x32GB CL16 Mushkin redLine 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 4K UltraHD
Hard Drives
Samsung MZ-V9P4T0B/AM 990 PRO 4TB PCIe®4.0 NVMe™ M.2 SSD was Toshiba KXG60ZNV1T02 NVMe 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 My Computer

At a glance

Windows 11 Pro
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 My Computer

At a glance

Win 11 25H2intel i7-870032GbIntel iGPU
OS
Win 11 25H2
Computer type
PC/Desktop
Manufacturer/Model
custom
CPU
intel i7-8700
Motherboard
Asus Z370 TUF Gaming
Memory
32Gb
Graphics Card(s)
Intel iGPU
Sound Card
Realtek
Hard Drives
Samsung
PSU
Corsair
Cooling
Fans

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 My Computer

At a glance

Windows 11 Pro
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 My Computer

At a glance

Windows 11 ProIntel Core i7-8565U8 GB
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
Back
Top Bottom