Skip to content

Variables and Scripting

Weatherlights edited this page Oct 23, 2024 · 5 revisions

You can use variables and a limited scripting logic within the wrapper. You can use the square brackets ([ and ]) to create your code.

Environment variables

To access environment variable you just write them between square brackets. All environment variables can be referenced this way.

[APPDATA]: Is the same as %APPDATA%.
[USERPROFILE]: Is the same as %USERPROFILE% (which is the home of the user directory).

Arguments

You can reference arguments by using special keywords within the wrapper:

[ARGS]: The argument string as it was given to the application.
[RESOLVED_ARGS]: The argument string but all type of logic that was in it is resolved (You can use this to parse wrapper code within arguments).
[ARGS|Argument]: This can be used to access a certain argument. In this case the value of the parameter argument is resolved.

Application directory and EXE name

You can resolve the path to the application directory or the running wrapper file by using the special variables EXENAME and APPDIR:

[APPDIR]: This will resolve to the application directory.
[EXENAME]: This will resolve to path of wrapper executable.

Change a file extension

You can change the extension of a file by using the function CHANGEEXTENSION.

[CHANGEEXTENSION|Path to the file|newext]: This change the extension of the referenced file to .newext.

Clone this wiki locally