batch scripts now open in npp instead of running.
-
What the title says. I’m using Win 10, and associated filetypes with NPP so I’d have “Edit with Notepad++” in the context menu. “Open with…” wasn’t appearing, and I assumed I’d be able to right click and use Run. Well, now Edit with NPP shows up, but I no longer have Run as an option, and double-clicking also opens the file in NPP. How can I make this work?
-
Try this,
Open Registry Editor, (regedit in Run {Win+R})
Goto
Computer\HKEY_CLASSES_ROOT\batfile\shell\open\commandChange “default” key to
"%1" %* -
@cobaltcoyote asked a question almost a month ago:
Hmm, I wonder how we missed that post originally. I know you haven’t been back, but sorry for not replying.
My advice would have been similar to what I said here.
I appreciate that you were trying to help. However, I don’t know whether that would really fix it. First, because that would just change it so the “edit in Notepad++” entry would go away, rather than allowing both to co-exist. Also, given the way that @cobaltcoyote changed the association, there’s a good chance it’s not even using the
batfileentry in the registry anymore; Notepad++ possibly created a separate key, and redirected.batto that key, rather than to thebatfile. The OP would then need to first changeComputer\HKEY_CLASSES_ROOT\.batback to having a (Default) ofbatfilebefore that fix would work – and probably wouldn’t need that fix if the oldbatfilehad been left unmodified.I would then suggest manually adding a new verb below
Computer\HKEY_CLASSES_ROOT\batfile\shell, with key=Notepad++, subkey=commandwith (Default) set to"c:\program files\notepad++\notepad++.exe" "%1" %*(or just change theeditcommand fromnotepad.exeto the notepad++ command I just listed.)But the fundamental problem was the Open With bug originally described. And following my advice from the other post would help fix that underlying root cause, too.
-
@PeterJones I thought, they wanted Batch to run instead of opening it in Notepad++ directly (like the default functionality); guess I mis-understood their motives…
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login