Drop file onto batch file to write that filename into the batch file's script?

Here is a method that doesn't require multiple files and is very simple. While it does not recreate the batch, I think it works in a superior manner.

@echo off
REM Must be run as  administrator
REM Get the value passed in if any
SET var=%1

REM If a value was passed in, save the value to a system environment variable
if not "%var%"=="" SETX MinJarLastFile %var% -m

REM If nothing was passed in restore from the environment variable
if "%var%"=="" SET var=%MinJarLastFile%

REM Run application with variable
"C:\path\to\program\program.exe" -variables "%var%"

REM Exit
exit /B /0