Then use Ftype to set the default programs. In this case, we have associated the Notepad++ app with file. @echo off Ftype txtfile=C:\Program Files