In order to perform the modulo operation with two variables (var1 and var2) the following steps should be performed.

  • Store the values in two variables using the "Set Variable" action (in our example we are using %var1% and %var2%).
  • Use the "Run VBScript" action and in the "VBScript to run" box enter the following code. 

result = %var1% MOD %var2%
Wscript.Echo result

  • We also need to specify the variable in which we want to store the VBScript output (in our case it is %VBScriptOutput%).
  • Finally we should use the "Trim Text" action on %VBScriptOutput" to get rid of the new line character and any white spaces.