Using the run & open actions

Touch Portal Action Guides

This guide will explain the action category "Run & Open". Here is the list of all actions of the Run & Open category. Each action will be walked through on this page.

Tutorial: Start, focus and/or stop an application

Check out this video tutorial that will teach you how to start application, activate and bring them to the foreground when they are already running and close them when they are the foreground application. This button combines these three situations but you can also choose to only implement parts of it.



Action: Launch Apps & Games

Touch Portal comes with an action that will be able to launch all applications and games installed on your system.

You can select the origin of the application or game in the first drop down list box and the actual application or games in the second drop down list box. This action will request Windows the start the application or game based on its registered ID.

The Launch Apps & Games action will start the application in the most neutral way in comparison with all other actions. Use this action whenever you can instead of the other action.
Not all apps and games will be available in the list. If you have an application that is not in the list, you can create a shortcut for that application and place that in your windows taskbar. Now fully restart Touch Portal and it should be registered as well by Windows and thus in the list.


Action: Start Application

The Start Application action can be used to start an application on your computer by using the path to the executable (or macOs application executable). Click on the action to add it to your buttons action flow.

The first control is the file chooser. You can click on the three little dots to open the file chooser. You can select an application you want to start by this action.

For some applications you can also pass arguments to have the application start differently. You can use the second field to set your arguments. For example; you can pass the argument -m to Touch Portal to start it minimized. If you are not familiar with this, just leave this empty.


Special case: Launching Steam games

Use the Launch Apps & Games action to start Steam Games directly. Only when this option is not available for you, use this manual method.

Launching Steam games is not possible in this way. To launch a Steam game you need to use the steam id and use the Open URL action from the category Navigation like this:


Special case: Launching Epic games

Use the Launch Apps & Games action to start Epic Games directly. Only when this option is not available for you, use this manual method.

Launching Epic games is not possible in the normal way just like Steam games. To launch an Epic game you need to do similar steps as with the steam-way. First you need to open the properties of the normal shortcut on your desktop to that game. It will hold an url that you need to copy and use on an Open URL action from the category.

Special case: Windows apps

Use the Launch Apps & Games action to start Windows Apps (UWP apps) directly. Only when this option is not available for you, use this manual method.

Windows apps are a special type of application. They are different from normal executables. Touch Portal has no trouble opening such applications but finding them can be difficult. Here is how you run windows Apps with Touch Portal:

  1. Open a file explorer
  2. enter this value: shell:AppsFolder
  3. This will open the applications folder.
  4. Pick the application you want to start
  5. Right mouse click and choose "Create Shortcut"
  6. Now use this shortcut in the Run shortcut action


Special case: Not launching applications

Some applications will not start up using this action. To be able to start such an application, use the Run a shortcut action and point it to a working windows shortcut.



Action: Run a shortcut

Instead of launching an application directly, Touch Portal also supports to launch a shortcut instead. In the example we pointed to the shortcut of Spotify.



Action: Open a file

With this action you can open an arbitrary file. Your OS will decide what to do with this. It will choose the application to open the application. Usually this is the application you have associated with the given file type. Sometimes a file has no association. In that case the OS can decided to do nothing. Just point the action to the file you want to open like this:

For example, when this action (image above) is executed it will open the specified PDF. In most situations PDFs will be opened by your browser but if you have Adobe Reader installed, it might open it in that instead. The OS is leading with this action and cannot be overruled by Touch Portal.



Action: Open a folder

This action allows you to open a folder on your computer. When executed it will open the finder on Mac or the file explorer on Windows at the given folder path. When you open the action it will show a popup where you can choose a path to a folder.

In this example the action will open the C drive on windows using the file explorer.



Action: Run a batch file

In Touch Portal you can also run batch files. When you add the action the first control lets you choose three options;

Run script This option will run the script and continue right away. Touch Portal will not wait for the script to finish and it will run the script in the background. Output of the script is also put in the log files of Touch Portal.

Run & wait script This option will run the script and wait for it to finish and it will run the script in the background. Output of the script is also put in the log files of Touch Portal. If the script does not finish, Touch Portal will not continue with the rest of the action flow.

Run & Open This will start the script in a command prompt window, just as it would when you run it from windows. Output will be show in that box just as normal. Touch Portal will not wait and will continue executing the rest of the actions in the flow.

Currently the run batch action will allow 1 argument.



Action: Run a Powershell Script

With Touch Portal you can start Powershell scripts directly. When you add the action you have to specify the path of the ps1 script file. You can also add arguments in the second field.

Please note that the path and arguments will be presented to the OS as one command line. This means that you need to use qoutes wherever necessary to have the powershell script parse the correct arguments.
Please note Touch Portal tells the OS that the origin of the script is the working directory of the file. If your script uses relative paths, you need to take account for this. If parts of the script are not working, ensure you use full paths to files and such.

Issue: Script does not execute

Touch Portal needs to be allowed to execute Powershell scripts. Depending on your windows setup this can be turned off. Follow these steps to get it working:

  1. Open the Windows Start Menu
  2. Navigate to 'All Programs' -> 'Windows PowerShell version' -> 'Windows PowerShell'
  3. Right click and select 'Run As Administrator'
  4. Type 'Set-ExecutionPolicy Bypass -scope Currentuser -Force'
  5. Press the ENTER key to execute the policy
  6. Now restart your PC so that it can take effect.

In Touch Portal actions are executed and when the action is done it will continue to the next action. This action will start the script and then for Touch Portal the action is finished. Touch Portal will not wait for the PowerShell script to stop or anything. If you need to wait before continuing, use the Wait for Timer action to build in some waiting time.


Back to Guide Overview