Configure commands

  • When configuring a command, the option Run Hidden runs the command hidden from the user.
  • Workspace Control can detect whether the command has run before for that user, on that computer or for the combination of that user on that computer. In the Run once field, you can configure whether the command should be executed or skipped depending on this information:
    • Select Run once to execute the command only if it has not yet been executed for the user starting the session.
    • Clear Run once to execute the command regardless of whether it has been executed before.
  • If you need to repeat an existing command that has been configured to Run once, select Clear history. If you select Clear history, the history of the command will be cleared and the command will be repeated once.
  • If a command has been configured to run at logoff, the option Wait for task to finish before continuing will always be selected. Specify a timeout in seconds to ensure Workspace Control does not wait if the task is unable to finish.
  • Required connection state specifies the required connection state that allows the command to be executed. For example, this allows you to configure a command that only synchronizes user files between a laptop and the network if the laptop has an online connection state. See Connection States.
  • For App-V applications, the option Run outside App-V virtual environment is available. This allows the command that was configured for the application to run outside the App-V virtual environment of that application.
    Execute commands running outside the App-V virtual environment take precedence over scripts which need to run inside the App-V virtual environment.
  • On the Script tab you can directly enter script contents. Enter (only) %script% in the command line on the Properties tab, to refer to the script tab content. Note that the correct file extension of the script is entered on the Script tab.
    • It is not possible to execute a Visual Basic- or PowerShell-script in combination with only the %script% variable in the command line. In that case, use the following in the command line:
      • To execute Visual Basic-scripts use cscript.exe %script%.
      • To execute PowerShell-scripts use PowerShell.exe %script%.
  • Click the Access Control tab to configure the Access Control criteria of the command.
  • Click the Workspace Control tab to configure to which Workspace Container(s) the command applies.
  • The option Execute Command can be Run using Dynamic Privileges. This means that the task will run "elevated", using Administrative Privileges, while maintaining default privileges for the user. The option Run using Dynamic Privileges is part of the functionality of the Security module and therefore is only available if this module is included in your license.
  • When executing PowerShell-scripts with Dynamic Privileges, use the following command line to prevent the profile script from loading: PowerShell.exe -NoProfile %script%

  • When configuring a Command as a script, the value entered as Administrative note (on the Properties tab of the Command) will be displayed in the User Event Log (at Diagnostics > User Sessions or at Diagnostics > Workspace Analysis) and in trace files. If no value was entered, %script% will be displayed.