Using args[] for opening files

Is there any way to put that into a batch file? Like to put into my app’s installer to automatically associate the file extension