Running server applications with a variable command-line provided by URL

After you publish an application in Cameyo, you can modify its command-line arguments. You can do it through the Web portal:

pkg1

pkg2

Or directly from the server:

cmdpublish1

cmdpublish2

In the arguments field you can insert special value %param_args%. This value will be automatically replaced by the URL variable "args", which can be provided along with URL calls.

Example:

App publishing:

Path: c:\Windows\system32\calc.exe

Arguments: %param_args%

Sample Play URL call:

https://online.cameyo.com/apps/{appid}/play?args=/Hello

Resulting server-side command line:

c:\Windows\system32\calc.exe /Hello


Advanced topics

File download as a parameter

In the URL's args variable, you can insert a special value (cyo-dl![http(s)://...]). In this case, the server will download the file from the specified URL and will replace it with its name within the command-line.

App publishing:

Path: c:\Windows\system32\calc.exe

Arguments: %param_args%

Sample Play URL call:

https://online.cameyo.com/apps/{appid}/play?args=(cyo-dl!https://files.cameyo.com/downloads/BuildPkgSample.xml)

Resulting server-side command line:

c:\Windows\system32\calc.exe C:\TempPath\BuildPkgSample.xml  ← file downloaded from the provided URL

Note: the local path for the file is arbitrarily chosen and may vary.

Other parameter types

In addition to %param_args%, other parameters can be substituted as parameters:

  • %user_ip%: substituted with user's IP.
  • %user_email%: substituted with user's email.
  • %user_uid%: substituted with user's unique identifier (GUID).
  • %group_uid%: substituted with user's group unique identifier (GUID). Only applies to users assigned to a user group.
  • %group_name%: substituted with user's group name. Only applies to users assigned to a user group.
  • %user_metadata%: substituted with user's (or user group's) metadata.