Support Request: How to add variable in External Application Param

Description

I start an external application (a scan) onClick on a button.
It works well but I need to add a variable in the parameter to add a unique incrementing number.

I've got this :
External application : C:\Program Files\NAPS2\NAPS2.console.exe
Parameter : -o "C:\Users\SiteKiosk\Documents\scan_$(nnnn).pdf" -p "main" -v
Doc : https://www.naps2.com/doc/command-line

But the $(nnnn) generate error.

I've got this error :
Content section 0 : Error: Argument 'variable' for method 'siteKiosk.environment.expand' was invalid :
The variable 'nnnn' was not found.
Nom du paramètre : variable

Answer: (1)

Re: How to add variable in External Application Param 2/24/2025 12:17 PM
Hello,

I'm sorry, but variables cannot be transferred / used at this point.
But you can create and use a batch file instead. I would recommend to save the batch in the same directory as the NAPS2.console.exe.
After you have tested that the batch file works, you can add it like the EXE under >Start app/program.

Note:
The command line window is blocked by default for security reasons and you would also have to uncheck the “ConsoleWindowClass” entry under ">Settings>Security>Built-in window filters>Neutral>Edit" to allow it.
Or you can create a new entry in the project under ">Settings>Security>Custom window filters" with "Add window filter" that allows the window created by your batch.
Possible parameters are window title, window class and window path to the executable file.

If SiteKiosk blocks a specific window, you will also find a notification in the SiteKiosk log (>Monitoring>[Client]>Logfiles).
Example:
[SiteKiosk] Window has been blocked:
Rule: Deny (WindowMessageClose) - Title: 'xxxxxxxxxx' Class: 'xxxxxxxxxx' Module: 'xxxxxxxxxx'
Window: Handle: xxxxxxxxxx Module: 'xxxxxxxxxxe' Title: 'xxxxxxxxxx' Class: 'xxxxxxxxxx'

Regards,
Michael Olbrich
My Account
Login
Language (Tickets):