Change the default program to open .bat files

1

I want to change the default program to open .bat files to cmder , so in the registry key : HKEY_CLASSES_ROOT\batfile\shell\open\command I did as following :

enter image description here

But when I open some .bat file I get the following error :

enter image description here

How can I solve this ?

Edit :

I changed the registry key value to : C:\Dev\Cmdr\Cmder.exe "%1"

But I get this message whenever I open some batch file:

The directory name is invalid.

enter image description here

Ichigo Kurosaki

Posted 2017-12-26T11:44:43.147

Reputation: 111

1"some" .bat files or all of them? Anything in particular about the bat files or their location? – Mokubai – 2017-12-26T11:52:10.440

Answers

0

You need to use quotes around the %1, otherwise paths with blanks in them arrvie as separate parameters: ...cmder “%1”

Aganju

Posted 2017-12-26T11:44:43.147

Reputation: 9 103

Please check my edit – Ichigo Kurosaki – 2017-12-26T12:04:46.953

0

I tried with ConEmu. I appended this string to the existing:

C:\(path_to_app)\ConEmu64.exe "%1" %*

The last part ("%1" %*) was there before the edit.

So I think you need to add %* after your whole string value in regedit (in your case): C:\Dev\Cmdr\Cmder.exe "%1" %*

EleazRs

Posted 2017-12-26T11:44:43.147

Reputation: 101