Registry hack to change default text editor not working

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
heavyharmonies
Posts: 1
Joined: 29 Mar 2017, 10:52

Registry hack to change default text editor not working

29 Mar 2017, 14:27

I have scoured the Interwebz for the recommended solution for changing the default text editor for the "Edit Script" command, found the recommended registry hack here, but sadly it isn't working.

Version: 1.1.25.01
OS: Windows 7 64-bit
Editor I want to set as default: IDM Computer Solutions UEStudio.

Registry hack I have tried running:

Code: Select all

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\emeditor.ahk\shell\edit\command]
@="\"C:\\Program Files\\IDM Computer Solutions\\UEStudio\\UEStudio.exe\" \"%1\""
It runs. I can see the new key created in the registry, but it has no effect. I've restarted Autohotkey. I've rebooted the computer. Nada.

What am I doing wrong?

Thank you in advance.
GEV
Posts: 1002
Joined: 25 Feb 2014, 00:50

Re: Registry hack to change default text editor not working

29 Mar 2017, 14:57

Code: Select all

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Edit\Command]
@="C:\\Program Files\\IDM Computer Solutions\\UEStudio\\UEStudio.exe %1"
You should always back up (export) the registry keys before making changes!
Michael Bolton

Re: Registry hack to change default text editor not working

02 May 2017, 16:34

I don't see you're doing anything wrong. And I don't see AHK trying to open anything like the registry key that's noted as being the one to configure. I believe this is a bug.

We all love notepad, of course, but...

---Michael B.
Michael Bolton

Re: Registry hack to change default text editor not working

02 May 2017, 17:18

I was experiencing a bug in an older version of AHK, but an update fixed it. I was confused about who was reporting what, there; GeSHi was right.

---Michael B.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Registry hack to change default text editor not working

02 May 2017, 17:45

According to this:
Edit
https://autohotkey.com/docs/commands/Edit.htm
the editor is specified here:
HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Edit\Command

Or if what you have is indeed the right location, for what you want to do: certain keys can only be edited if the AHK script is run in Admin mode.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
boardtc
Posts: 48
Joined: 12 Feb 2016, 10:13
Contact:

Re: Registry hack to change default text editor not working

26 Oct 2017, 06:23

Worked for me thanks, I needed to edit as admin! I had a typo ' in my path that stopped it working, this worked for me:

Code: Select all

"C:\Program Files\Just Great Software\EditPad Pro 7\EditPadPro7.exe" %1
Last edited by boardtc on 26 Mar 2019, 06:02, edited 1 time in total.
User avatar
boardtc
Posts: 48
Joined: 12 Feb 2016, 10:13
Contact:

Re: Registry hack to change default text editor not working

26 Mar 2019, 05:17

And now setting this up on a Windows 10 machine does not work for me :-(
Image Broken Link for safety
Sigh, anyone had this issue?
GEV
Posts: 1002
Joined: 25 Feb 2014, 00:50

Re: Registry hack to change default text editor not working

26 Mar 2019, 05:29

@boardtc,
try

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Edit\Command]
@="\"C:\\Program Files\\Just Great Software\\EditPad Pro 7\\EditPadPro7.exe\" \"%1\" %*"
User avatar
boardtc
Posts: 48
Joined: 12 Feb 2016, 10:13
Contact:

Re: Registry hack to change default text editor not working

26 Mar 2019, 05:49

Thanks! I opened regedit as admin. I cut and paste above to be sure into the command key. I closed regedit to be sure. I reloaded AutoHotKey. I then selected edit this script and it opens in notepad :-(
GEV
Posts: 1002
Joined: 25 Feb 2014, 00:50

Re: Registry hack to change default text editor not working

26 Mar 2019, 05:57

The above code is for a reg file.

Paste this in the Registry editor:
"C:\Program Files\Just Great Software\EditPad Pro 7\EditPadPro7.exe" "%1" %*
User avatar
boardtc
Posts: 48
Joined: 12 Feb 2016, 10:13
Contact:

Re: Registry hack to change default text editor not working

26 Mar 2019, 06:08

Ah ok, that makes sense. The change compared to what worked on Windows 7 was adding quotes around the %1 and adding the trailing %*
For whatever reason, the above does not work on my Windows 10 machine :-(
I even tried removing the Command key again and adding a command one & cut and paste above.
GEV
Posts: 1002
Joined: 25 Feb 2014, 00:50

Re: Registry hack to change default text editor not working

26 Mar 2019, 06:23

Restart the OS after pasting and look afterwards if the entry has changed.
User avatar
boardtc
Posts: 48
Joined: 12 Feb 2016, 10:13
Contact:

Re: Registry hack to change default text editor not working

26 Mar 2019, 10:51

I restarted, opening regedit the expected entry was there in HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\command but selecting edit script from the context menu opens it in Notepad :-(

Image Broken Link for safety

Does anyone else have this issue in Windows 10?
User avatar
boardtc
Posts: 48
Joined: 12 Feb 2016, 10:13
Contact:

Re: Registry hack to change default text editor not working

11 Oct 2019, 11:15

I can confirm this now works for me when I look at it again today. :D
mmmax
Posts: 81
Joined: 25 Jun 2018, 09:01

Re: Registry hack to change default text editor not working

30 Jan 2023, 23:15

boardtc wrote:
26 Mar 2019, 10:51
I restarted, opening regedit the expected entry was there in HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\command but selecting edit script from the context menu opens it in Notepad :-(

Image Broken Link for safety

Does anyone else have this issue in Windows 10?
If the above info didn't work in helping to resolve this (as it didn't for me), here's a link to the solution that did work for me.

https://www.autohotkey.com/boards/viewtopic.php?p=504898#p504898

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Nerafius and 106 guests