Jump to content
Angus Robertson

Windows 11 22H2 lost batch file association

Recommended Posts

Not sure if it's just my PC, but updating to Windows 11 22H2 last week stopped .BAT files running due to the file association being removed, it seems Windows now prefers them to be called .CMD instead.   Most other file associations disappeared as well, but that is just Microsoft wanting us to use it's own apps and not better ones.

 

Easy enough to rename my common batch files, but GetIt often builds libraries using BAT files, so had to restore the file association with a little REG file.

 

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat]
[-HKEY_CURRENT_USER\Software\Classes\.bat]
[-HKEY_CURRENT_USER\SOFTWARE\Classes\batfile]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.bat]
@="batfile"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\open\command]
@="\"%1\" %*"

 

Windows Explorer also now crashes with a .NET run time error, which is pretty sad, fortunately I mainly use the Delphi UltraExplorer instead.  Possible the Explorer crash is due to third party software like Open Shell Menu.

 

Angus

 

 

 

Share this post


Link to post

On my Insider Preview of Windows 11 22H2 (Build 22622.290) the batfile association, set in HKLM\Software\Classes, remains - as do all other expected file associations. I wouldn't have thought that would be something Microsoft would mess with as it would break so much stuff.

Share this post


Link to post

I am on beta channel for Windows 11 and my build 22622.601 has no problem with BAT files. Actually, I have a couple BAT files in schedule running daily without any problem.

Share this post


Link to post

Lost file associations may depend on how you upgrade to 22H2.  I downloaded the full ISO from Visual Studio Downloads, and did an in place update, as I've done for previous versions, since it is not available for Enterrprise from Windows Update.  All applications and setting remained okay. 

 

.BAT was the only association removed (I think), others remained, but multi-media files all come up once asking how do you want to open this file, offering to continue using VLC as the first option, but suggesting Clipchamp as the first option, which I assume is some new Microsoft tool added to Windows 11.

 

Angus 

 

Share this post


Link to post

.bat is pretty stoneage. 
.cmd has replaced it.
unless you go for PowerShell, which is .ps1 (I absolutely love PS)

Share this post


Link to post
1 hour ago, Lars Fosdal said:

.bat is pretty stoneage. .cmd has replaced it.

But not in the GetIt scripts, and perhaps many other installers, which is why I brought it up.

 

Angus

 

  • Like 1

Share this post


Link to post
17 minutes ago, Lars Fosdal said:

Who on Earth wrote that? Some of these diff's I just can't understand (" When the error level is called using BAT, the previous command is executed. " - ?? "Commands and utilities along with the programming language make CMD unique" / "The program is just a batch script and is called a batch file" - WTH that means?), some mention ancient command.com (my W7 has no this binary and still BAT files can be run), and some are just weird.

I was always thinking CMD is just a newer alias for BAT introduced just to calm down MS's NIH syndrome.

 

P.S. EXE is even more stoneage. Why not replace it with something new? 🙂

Edited by Fr0sT.Brutal
  • Like 1

Share this post


Link to post
5 hours ago, Fr0sT.Brutal said:

P.S. EXE is even more stoneage. Why not replace it with something new? 🙂

Like "APP" ? 😉 

 

(Which was already used in the Atari ST's TOS in 1985, just in case you didn't know.).

Edited by dummzeuch

Share this post


Link to post
1 hour ago, Fr0sT.Brutal said:

P.S. EXE is even more stoneage. Why not replace it with something new? 🙂

By .DMG ???   ..... NOOOOT :classic_biggrin:

Share this post


Link to post
15 hours ago, dummzeuch said:

Like "APP" ? 😉 

Following MS-beloved naming style, that rather would be "*.Microsoft.Windows.Application" 😄

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×