Hi,
you can simply write it like this (excerpt from install.bat
):
reg add "HKCU\Software\Classes\luafile\shell\open\command" /ve /d "\"%~dp0bin\luart.exe\" \"%%1\" %%*" /f >NUL
Mind the %%*
at the end of the command.
I would suggest to add it to both commands, just like any other script interpreter does (look at Python after installation).
As an example: you have an editor written using the ui
module, but it is not convinient to always run the script and select File->Open from the menu just to read some text file. Calling something like MyEditor.wlua "C:\Temp\test.txt"
is much easier.
On my system i added .lua
and .wlua
to my %PATHEXT%
environment variable, so that i can run my scripts directly by just typing the name in the commandline. Without these %%*
that wouldn't be possible.
Greetings