Tuesday, May 22, 2012

How to restore your file type association to .bat (batchfile)



If you have associated the extention file of .bat to for example Notepad, you have to remove this manually from Registry. Microsoft obviously did not provide a way to restore back to default program for .bat!
Do as follows:


From a command prompt run the following:
> assoc .bat
that should return with
..bat=batfile
If not run :
> assoc .bat=batfile
to restore the default file type association.

> ftype batfile
should return with
batfile="%1" %*
If not run:
> ftype batfile="%1" %*

Finally remove from your Registry the associated program:
Look for
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts
and delete the key named and this should looks like below:

No comments:

Post a Comment