Which program interprets the Windows batch file by default

I am working on Windows 7, and I found that Notepad was installed as the default program to open my .bat files. Therefore, when I try to execute a batch file with a double click, it opens with notepad.

I tried to install cmd.exe as the default program, which did not work.

What is the default program that I have to install to execute .bat files?

+6
source share
3 answers

Click "Start" → "Run" and type "REGEDT32" and press "Enter" to start the registry editor.

Find the following key:

HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ FileExts.BAT \ UserChoice

and delete the key named "UserChoice".

+10
source

Check the output of the following commands:

C:\> C:\>assoc .bat .bat=batfile C:\>ftype batfile batfile="%1" %* C:\> 

If your result is different, you need to fix the settings (see assoc /? And ftype /? For reference)

+6
source

Right-click the bat file and select open - and go to system32 \ cmd.exe

If this fails to apply, then security software may block registry changes.

0
source

All Articles