I dont’t use Windows (nor the Exec binding for that matter…) but from the docs I understand that the second parameter gets the input channel command, not the first:
The following parameters are automatically added:
the current date (as java.util.Date, example: %1$tY-%1$tm-%1$td)
the current (or last) command to the input channel (see below, example: %2$s)
note - if you trigger execution using interval or the run channel, the %2 substitution will use the most > recent command…
id: output
channelTypeUID: exec:output
label: Output
description: Output of the last execution of the command
configuration: {}
id: input
channelTypeUID: exec:input
label: Input
description: Input that will be passed as second parameter to the command
configuration: {}
id: exit
channelTypeUID: exec:exit
label: Exit Value
description: The exit value of the last execution of the command
configuration: {}
id: run
channelTypeUID: exec:run
label: Running
description: Send ON to execute the command and the current state tells whether
it is running or not
configuration: {}
id: lastexecution
channelTypeUID: exec:lastexecution
label: Last Execution
description: Time/Date the command was last executed, in
yyyy-MM-dd’T’HH:mm:ss.SSSZ format
configuration: {}
You don’t define it anywhere. You just have to add it to your command where it needs to go.
R:_OpenHAB_OpenHAB\conf\misc\string2file.bat %2$s
Pay attention to the examples in the add-on docs:
php ./configurations/scripts/script.php %2$s
...
// "%2$s" will be replace by the input channel command, this makes it possible to use one command line with different arguments.
// e.g: "ls" as <YOUR COMMAND> and "-a" or "-l" as additional argument sent to the input channel in the rule.
Thing exec:command:yourcommand [ command="<YOUR COMMAND> %2$s", interval=0, autorun=false ]
Before the command is called,. %2$s is replaced with what ever state the Item linked to the Input Channel currently has or the command that was sent to that Item.
Note the whitelist must match exactly this command so if you add the parameter you’ll have to update the whitelist too.