PROVISIO DevBlog

Charging for Applications Opened from the SiteKiosk Windows Start Screen

In case you want to charge for applications that are started from an element on the Start Screen, you need to start the application using an html link instead of starting the application directly. Please note that only the Start Screen in combination with the IE browser engine allows the usage of payment features.

In the following example we will use Microsoft Word to demonstrate the process. You can apply this to any other application.

First open an editor like Notepad. Copy and paste the following html code:

<html>
   <head>
      <script type="text/javascript">
         <!--
            function StartApplication(){
                  window.external.InitScriptInterface();
                  SiteKiosk.ExternalApps.Run("C:\\Program Files (x86)\\Microsoft Office\\Office15\\WINWORD.EXE", true);
                  window.close();
            }
         //-->
      </script>
      <title>Word</title>
   </head>
   <body onload="StartApplication();">
   </body>
</html>

The SiteKiosk Object Model method Run starts the actual application. Change the path to whatever application you want to start and charge for. Make sure to use double backslashes in the path.

Save the above html code as an html file (e.g. word.html) and put it in the ..\SiteKiosk\html folder. Do the same for every application you want to start from the Start Screen. If for example you want to run 3 applications, you need 3 html files, one for each application.

Now open the configuration editor of SiteKiosk and add your application on the Applications page.

Next configure your payment device(s) and the service rates on the Payment Devices page.

Then switch over to the Start Page & Browser settings. Choose Internet Explorer as the browser engine. Select the Start Screen and click on Customize. In the new dialog go to Start Screen Editor and open the editor. In the template you want to use, add a new element and select Web link instead of Application link.

Add the html file that starts the desired application as a link and make sure to select a matching caption for the element.

For our example we would use file:///C:/Program Files (x86)/SiteKiosk/Html/Word.html.

Create a web link element for each of the applications you want to use.

Now SiteKiosk will charge for starting an application from the Start Screen.