Accessing 64-Bit System Folders and Registry Paths from the SiteRemote Job System

The SiteRemote component on the Windows client side is a 32-bit application. This means that the SiteRemote jobs you are running on the client are executed within a 32-bit context. This is relevant when your are using a 64-bit system and you for example want to access the SOFTWARE folder in the Windows registry. By default you will then target the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node path instead of HKEY_LOCAL_MACHINE\SOFTWARE. The same applies to applications from the System32 folder, by default a 32-bit application will be redirected to C:\Windows\SysWOW64 instead of using C:\Windows\System32.

What to do, when you explicitly need to access the 64-bit part of the registry or start a 64-bit system application? Microsoft offers solutions that you can use in your SiteRemote jobs to mitigate the behaviour described above.

First let's look at the Windows registry. To for example set registry values for a 64-bit application by using a SiteRemote job you can create a job with the action type Run Ececutable and use the following command line:

reg import C:\Windows\Temp\test.reg /reg:64

This calls the reg.exe application with the parameter import that specifies the path to .reg file that includes the registry data you want to write to the registry (for this example we assume that there is already a test.reg file in c:\Windows\Temp). After that you use the /reg:64 switch to specify that you want to import the data from the .reg file to the 64-bit part of the registry. For the purpose of this test the content of the .reg file will look like this:

Windows Registry Editor Version 5.00

"TEST"="Test Value"

A SiteRemote job step that includes the above will look like this:

A successful execution will show this result:

When not applying what has been described above the test value would have been written to the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node path.

Next we will look at starting a 64-bit application. For this demonstration we will use the 64-bit version of notepad.exe located in C:\Windows\System32 on a 64-bit Windows system. In order to be able to start this application from the 32-bit environment of the SiteRemote client we need to use a batch file that makes use of the Sysnative folder redirection of Windows. Using Sysnative as the folder name will redirect any request, even those from a 32-bit application, to the native system folder of 64-bit Windows system it is used on. Our batch will look like this:

start %windir%\Sysnative\notepad.exe

For this demonstration we will place it in C:\Windows\Temp as test.bat. Of course you could also create another SiteRemote job step that uploads the file to the client. Next we create the job step that executes the batch file. The command line looks like this:

c:\windows\syswow64\cmd.exe /c "start c:\windows\temp\test.bat"

For the path to the cmd.exe we could actually also use c:\windows\system32\cmd.exe. This will automatically be translated to the SysWOW64 folder on a 64-bit system.

Our job will look like this:

For the purpose of this demonstration we will choose the option Visible execution with user rights to make notepad.exe show up. Executing the job on the target system will give us this result:

Note that the task manager shows that this is actually the 64-bit version of notepad.exe (visible from the missing 32 bit appendix).

Using Input Devices in the SiteKiosk Start Screen

The Start Screen start page of SiteKiosk is Chrome-based and allows you to freely configure a start page for SiteKiosk that matches your requirements. It also supports the SiteKiosk Object Model to further increase the customization options. Because the design is Chrome-based it uses the new SiteKiosk Object Model for the Chrome-based part of SiteKiosk. This Object Model is still in the making so the most current state of the preliminary documentation can be obtained through our support department. Interested developers can just send us a short email.

The following demonstration shows you how to use the SiteKiosk Object Model in the Start Screen (there is also one other example usage documented here). We will use the new SiteKiosk 9 feature to read input from any USB input device that uses keyboard emulation as an example how to achieve this goal.

First create a new configuration for SiteKiosk and select the Start Screen on the Start Page & Browser page. Click the customize button and for the purpose of this demonstration pick Template 3. Create a new HTML widget and edit it to add the code that contains the SiteKiosk Object Model.

The code to add is loosely based on the general Chrome-based example described in more detail in the SiteKiosk help. The code we will use for the Start Screen looks like this:

	var callbackFunc = function (data, deviceName) {"TEST",0,deviceName + " registered the following data: " + data);

	function registerDevice() {
		var deviceName = document.getElementById("devicename").value;

		if(deviceName == "")"TEST",0,"No input device found!");

		var device = parent.siteKiosk.devices.getByName(deviceName);

		if(device == null)"TEST",0,"No input device found!");

		device.valueChanged(callbackFunc);"TEST",0,"Registered input device: " + JSON.stringify(device));
<div style="background:white;padding:10px;">
	Test page for reading the input of keyboard emulation 
	devices configured in the configuration of SiteKiosk 
and writing the received data into the SiteKiosk log.<p />
		Listen to input from this device that has been 
		configured in SiteKiosk: 
		<input id="devicename" tpye="text" /> (state the device name) <button onclick="registerDevice()">Register the listener</button>

The most significant changes to the original code example are that you leave out the line that initializes the external script for the Object Model:

<script>(new Function(_siteKiosk.getSiteKioskObjectModelCode()))();</script>

This is because the Object Model is already initialized in the parent of the HTML widget, therefore you can access all objects, methods, etc. of the Chrome-based SiteKiosk Object Model by adding parent when you use it in the Start Screen:"TEST",0,deviceName + " registered the following data: " + data);

After you copied the code to the HTML widget you can save the changes to the Start Screen and go to the configuration page for Input Devices. Add an input device. For testing you may just attach an additional keyboard to your computer, but do not use the one attached to your computer already or a keyboard that is exactly the same model, as the device will be exclusively used for the input device feature and therefore does not accept keystrokes for normal usage, e.g. hitting Escape to close SiteKiosk, once you start SiteKiosk. Choose a display name for your device, this will be necessary to identify the device in the script, as it is used to register the device listener:

For this example you should also enable the debug output window under Logfiles in the configuration of SiteKiosk. Then save the configuration and start SiteKiosk in Run Once mode. Type the device name you used in the SiteKiosk configuration into the input field and click on the button to register the device listener. If the registration succeeded you will see a log entry. The same applies if you now create input from the attached device:

Using the Blackboard to Transfer Machine Information from SiteRemote to SiteKiosk Android

A previous post has explained how to use the blackboard feature of SiteRemote and SiteKiosk to work with machine information provided by SiteRemote on the Windows client version of SiteKiosk. This handy tool is available for the SiteKiosk Android version as well. Just like with the Windows version you can read information like team name or machine name used on the SiteRemote server to work with it on the SiteKiosk Android client side.

Note that at the time of writing this post the available blackboard information is not as extensive for the Android version as it is for the Windows version but that will change with time. The strings of the blackboard for Android are also in JSON format but currently none of the available values uses complex strings, so you do not need to convert the strings before working with them.

The SiteKiosk Android Object Model provides the siteKiosk.siteRemote.blackboard.getAll method to query blackboard entries. It accepts a string that contains either the full name of a blackboard value or part of it combined with an asterisk (*). The method returns an array that includes all matching blackboard entries. Each entry has a key and a value property. Key is the name of the blackboard entry and value obviously contains the value of that blackboard entry. The following example will demonstrate the different variants.

<!--The following line is required and links to the local SiteKiosk Object Model.//-->
	<script type="text/javascript" src="sk:///siteKiosk/siteKiosk.js"></script>
			This machine is part of the SiteRemote Team <span id="teamname">[Information not yet available.]</span> and 
			its display name on the SiteRemote server is <span id="machinename">[Information not yet available.]</span>.
			<br /><br />
			These are available blackboard keys:
			<br />
			<span id="blackboardkeys">[Information not yet available.]</span>
    <script type="text/javascript">
        //Wait until the SiteKiosk Object Model is loaded.
		siteKiosk.ready(function (){
			//First check if the machine is registered with SiteRemote.
			if (siteKiosk.siteRemote.registration.isRegistered()){
				//Registered. Trigger the initial blackboard request. Note: the first request will most likely come back empty.
				//Not registered. Show message on screen.
				window.alert("This machine is not registered with SiteRemote!");
			function ReadSiteRemoteBlackboard(){
				//Get the name of the SiteRemote team the machine is registered with.
				var array_teamname = siteKiosk.siteRemote.blackboard.getAll('StC.TeamInfo.Name');
				array_teamname.forEach(function (entry) {
					document.getElementById("teamname").innerHTML = entry.value;
				//Get the display name of the machine in the SiteRemote team it is registered with.
				var array_machinename = siteKiosk.siteRemote.blackboard.getAll('StC.MachineInfo.Name');
				array_machinename.forEach(function (entry) {
					document.getElementById("machinename").innerHTML = entry.value;
				//Get all available blackboard keys.
				var array_allblackboardkeys = siteKiosk.siteRemote.blackboard.getAll("StC.*");
				document.getElementById("blackboardkeys").innerHTML = "";
				array_allblackboardkeys.forEach(function (entry) {
					document.getElementById("blackboardkeys").innerHTML += entry.key + "<br />";

Note that a SiteKiosk Android Object Model documentation is not publicly available yet but a preliminary version can be obtained by contacting PROVISIO support.

In order to make use of the above code the SiteKiosk Android machine needs to be registered with a SiteRemote server. After the machine has been registered it can take a few minutes until the information is available on the client. You may just refresh the example page or change the code to automatically refresh it using default Javascript methods. Periodically checking the blackboard information will also ensure that changes will become available on the client shortly after they happen on the server.

This is the test setup used for the example code test scenario:

You can place the example code in an HTML file and either place it locally on the Android device or put it on a web server. Then configure the page to for example be your SiteKiosk Android start page and do not forget to give it script allowance in the SiteKiosk Android configuration. This is how it will look once you run the page in the SiteKiosk Android browser:

Using the SiteRemote Database from other Applications

In case you are using your own SiteRemote Server you are able to access the valuable data of the SiteRemote database from other applications. The SiteRemote database includes a great number of information that is useful for other purposes as well, such as address information, software and hardware information etc.

The SiteRemote database utilizes the common Microsoft SQL engine, so start with having a look at the SiteRemote database tables by using the Microsoft SQL Management Studio and connect to your SiteRemote Server. You will see that most of the tables are using pretty obvious names.

You can use the default coding methods of your preferred programming language to access the database, either locally or remotely. Make sure that you have a database user with appropriate user rights and that you configured the SQL database access according to the Microsoft SQL Server documentation.

A simple C# code for such an SQL query, that finds all terminals that are in the time zone with idx 72 (GMT+01:00, you will find the time zones in the table tblTimeZone) and writes them into a text file, can look like this:

using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SRdbAccess
    class Program
        static void Main(string[] args)
            //Required information to connect to the database.
            SqlConnection obj_sqlconnection = new SqlConnection("Server=;Database=SiteRemoteBackEndServer;User Id=TheUserName;Password=TheUserPassword;");
            //Query that retrieves all terminals that are in a specific time zone.
            string str_sqlquery = "SELECT * FROM tblTerminal WHERE TimeZone_Idx = @Timezone";
            //Build the SQL command.
            SqlCommand obj_sqlcommand = new SqlCommand(str_sqlquery, obj_sqlconnection);
            //Look for terminals from time zone with idx 72, which is GMT+01:00. You will find the time zones in the table tblTimeZone.
            obj_sqlcommand.Parameters.AddWithValue("@Timezone", 72);

            //Use the data reader to show the display name of all terminals that are from the same time zone and write them to a file.
		    SqlDataReader obj_sqldatareader = obj_sqlcommand.ExecuteReader();
            using (System.IO.StreamWriter obj_filetowriteto = new System.IO.StreamWriter(@"C:\Users\Public\Documents\SiteRemoteSQLQueryResult.txt", true))
                while (obj_sqldatareader.Read())

            //Close the data reader after the read process.

            //Close the connection to the database.

The following screenshot shows you an example result of the above query. The search returns the display name of the three terminals that are in the time zone with idx 72:

Opening New SiteKiosk Browser Windows from a Start Screen HTML Widget

The new Chrome-based SiteKiosk Start Screen allows you to select from a number of different element types to create your personal Start Screen design. One of these elements is an HTML Widget that can be used to freely create a part of the Start Screen with all the options HTML allows you to use. Your design may include links that you want to open in a new SiteKiosk Browser window. This can easily achieved with a single line of code.

The line you need to use to open links is:, 0, 0, 0, link);

Note that the first four parameters of the create method are for internal use only und should be left at 0. The link parameter accepts a string in the form of

The following is a complete example that shows a 2 button list in a div-element. The buttons open links in new SiteKiosk browser windows.

<script type="text/javascript">
	function OpenTheLink(link) {, 0, 0, 0, link);
<div style="background-color:white;height:100%;padding:10px;font-family:Arial;">
	A list of links that will open in a new browser window:<p />
	<button onclick="OpenTheLink('')"></button><p />
	<button onclick="OpenTheLink('')"></button>

To try out the code please go to the editor of the SiteKiosk Start Screen and select for example the empty Template 3. Next select to add a new HTML Widget.


Edit the widget and add the code from above.

Save your changes and start SiteKiosk. When you click the buttons the assigned link will open in a new SiteKiosk browser window.

Troubleshooting Guidelines for Using External Applications with SiteKiosk Windows

Under most circumstances you should be able to run external applications from within SiteKiosk just fine. Nonetheless there can be applications which do not run without making adjustments first. The following hints and tips should help you to pinpoint the most common problems that prevent an application from running as desired.

These guidelines apply to executable files (.exe) as well as to batch files (.bat or .cmd). When using a batch file, please also refer to this FAQ article about autostarting .bat or .cmd files, that includes some general usage rules for batch files. If you are generally interested in automatically starting your application when using SiteKiosk, please have a look at this FAQ.

When configuring an application or batch file always make sure that the path to the file is correct. If possible the application should be installed under a default application path like Program Files or Program Files (x86). Batch files should also be place in a common path like C:\Users\Public\Documents. It is not recommended to place either of the files on the desktop of any user, you might run into access problems otherwise, when using another user later on.

Your first troubleshooting step should always be to start SiteKiosk in "Run once" mode. Doing so will help to rule out whether user access rights or user dependent settings are a limiting factor, that come into play if you use the "Autostart" option that will use the restricted SiteKiosk user.

If the application or batch doesn't start in "Run once" mode, the most likely reason is the Windows & Dialogs managment of SiteKiosk. In that case you see a "For security reasons this action is not allowed" message on the screen and the application window will be blocked. This will also result in a helpful notification in the SiteKiosk log (…\SiteKiosk\Logfiles).
That notification will have the following format:

[SiteKiosk] Notification: According to the windows monitoring rule(Title:'xxxxxx' Class:'xxxx') the window (Title:'xxxxxxxx' Class:'xxxxxxxxx') will be closed

Based on that notification you should create a new allow entry in the configuration of SiteKiosk at Access/Security --> Block system critical windows & dialog boxes --> Settings with the corresponding title and class.
Further information about creating such an entry can be found here
and here

If your application or batch file works in "Run once" mode but doesn’t work in "Auto Start" mode you most likely have to adjust program access and/or directory access rights. These can for example include read AND write access to the corresponding directories of your application or batch file.

If necessary, you can use the System Security Wizard to adjust this and other rights for the SiteKiosk user (Customized-->Folder access):

You may also have to explicitely allow the executable you want to use if it is on a block list for the SiteKiosk user:

If all of the above has been taken care of and your application/batch works in "Run once" mode but still not in "Autostart" mode, you may try starting SiteKiosk automatically without shell replacement ("Customized" starting mode):
Some applications, especially older ones, won’t work properly when the default Windows shell (explorer.exe) is not present, which is the case when using "Autostart".

As a final note, please be aware that shortcuts (.lnk extensions) and Windows 8 apps will not work as external applications under SiteKiosk. Windows 8 (Modern UI) apps do not provide a way that enables another application like SiteKiosk to control them properly, therefore they cannot be managed by SiteKiosk.

Starting the SiteKiosk File Manager from the Start Screen

This time we are going to have a look at how to start the SiteKiosk File Manager directly from the SiteKiosk Start Screen.

First we need to create a local html file that takes care of the task of opening the File Manager. The code for that file can look like this:

    <script type='text/JScript'>
        //Initializes the SiteKiosk Object Model
		//Checks the prerequisites for opening the File Manger
        function OpenMediaWindow()
                //Initializes the payment features of SiteKiosk
				var lk_SiteCash = SiteKiosk.Plugins("SiteCash");
				//Checks if payment is in use and handles the opening of the File Manager accordingly
				if (lk_SiteCash == null || lk_SiteCash == undefined || lk_SiteCash.Enabled && !lk_SiteCash.PayApplications || lk_SiteCash.Enabled && lk_SiteCash.AccessStatus || lk_SiteCash.Enabled && lk_SiteCash.CurrentBalance > 0.0 || lk_SiteCash.Enabled && lk_SiteCash.ApplicationPrice == 0.0 || lk_SiteCash.Enabled && lk_SiteCash.AccessStatus || !lk_SiteCash.Enabled)
                    //Payment is active and inpayment is required
					SiteKiosk.Plugins("SiteCash").ShowPaymentInfoDialog(0, "", false);
            catch (e)
		//Opens the actual File Manager
        function OpenIntWindow()
            //Defines the available Window styles for the File Manager window
			var WS_OVERLAPPED = 0x00000000;
            var WS_MAXIMIZEBOX = 0x00010000;
            var WS_MINIMIZEBOX = 0x00020000;
            var WS_THICKFRAME = 0x00040000;
            var WS_SYSMENU = 0x00080000;
            var WS_BORDER = 0x00800000;
            var WS_CAPTION = 0x00C00000;
            var WS_MAXIMIZE = 0x01000000;
            var WS_MINIMIZE = 0x20000000;
            var WS_POPUP = 0x80000000;
            var WS_EX_TOOLWINDOW = 0x00000080;
			//Creates the File Manager window and assigns its settings
            var mediabox = SiteKiosk.SiteKioskUI.CreateHTMLDialog();
            mediabox.URL = SiteKiosk.SiteKioskDirectory + "skins\\public\\Media\\FileManager\\Selector.html";
            mediabox.Styles = 13565952;
            mediabox.Icon = SiteKiosk.SiteKioskDirectory + "skins\\public\\Media\\FileManager\\Img\\Icons\\fms_ico.ico";
            mediabox.Width = screen.width > 800 ? 1024 : 800;
            mediabox.Height = screen.height > 600 ? 700 : 550;
            mediabox.ExStyles = 0;
            mediabox.Border = true;
            mediabox.Type = "FileManagerDlg";
            mediabox.TopMostWindow = true;
            mediabox.CloseOnInput = false;
            mediabox.Parent = SiteKiosk.WindowList.MainWindow.SiteKioskWindow.Window;
			//Closes this window after the File Manger has been started
    <body onload="OpenMediaWindow();">
    <!-- Body is empty as this window is only used to open the File Manager //-->

Just copy and paste the code to an editor and save it as for example as openfilemanager.html. Now place the file in the html subfolder of your SiteKiosk installation folder.

Next it's time to open the SiteKiosk configuration and under Start Page & Browser select the Start Screen. Click on Customize and open the Start Screen editor. Select one of the three templates and create a new web link element. Edit the element to your liking (icon, color, caption, etc.) and link to the newly created file.

The following example of the result used Template 3 with just a single link element to open the File Manager.

Using the Windows Screen Saver to Show Digital Signage Content

Some of our customers have asked us, if they can use the Digital Signage solution that is part of SiteRemote without starting the SiteKiosk application on the client. Instead of SiteKiosk they had the Windows screen saver in mind. A scenario for this would be that a company wants to show non-critical internal information on the desktops of their employees, e.g. information about social events.

The simple answer is: yes, that is possible. Just install SiteKiosk Windows on the client PC and register it with your SiteRemote team. The SiteKiosk installation is required as it contains the Digital Signage and remote management elements required to place and monitor the content on the client PC. Note that you need a SiteRemote license but as long as you don't want to secure the PC by starting the SiteKiosk browser and only use Digital Signage for the Window screen saver you do not need a SiteKiosk license.

On the client computer you need to open the Windows screen saver management and select SiteCaster from the dropdown menu of available screen savers. Set the screen saver time to the desired value.

Under your SiteRemote team you can create the Digital Signage content as usual and then assign it to the registered clients. Every time the Windows screensaver starts, it will display your Digital Signage files.

Note that you can mix these client PCs with others on which you are using SiteKiosk to protect the computer, so you can effortlessly manage both from your SiteRemote team.

Using the System Team to Create System Job Templates on a SiteRemote Server

While using a SiteRemote team, either on or on your own SiteRemote Server, you may have noticed that you will see different types of job templates under the SiteKiosk -> Jobs tab. There are system and team job templates. By default only system job templates are available, team job templates are created by a user of a team and will be added to the list of available system templates.

The existing system templates cover a number of useful tasks and are the same for every team on a SiteRemote Server. They are included in the SiteRemote Server installer.

If you run your own SiteRemote Server with a Business Edition license, that allows you to create multiple teams, you can create system job templates yourself. This makes it easy to assign often used  job templates not only to one but all teams on your SiteRemote Server, without the hassle of creating the same job separately for each team.

Customers with a Personal Edition license can only use one other team besides the System Team, therefore it does not make sense for them to create system job templates.

System job templates are part of the System Team. To log in to the System Team on your SiteRemote Server go to the SiteRemote Server Administration website and select the Teams tab. First in the list on that page with an ID of 0 is the System Team. Under the Users column click on the Show link and on the following page use Impersonate for the SystemUser to enter the System Team.

After the log-in to the System Team go to the SiteKiosk -> Jobs tab and create a new job template. That process is the same as if you would create a new job template under a normal team and is described in the SiteRemote documentation here. After the template has been created and saved under the System Team it will automatically show up under all other teams on the same server as a new sytem job template.

Please note that creating a system job template is the only reason you should ever be required to login to the System Team. The System Team should not be used for any other purposes. It is required for general background tasks that are automatically conducted by the SiteRemote Server itself.

If you are a customer who is utilizing our SiteRemote Dedicated Server option you can contact PROVISIO so we can create a new system job template for you.

Different Ways to Create SiteKiosk Windows and Android Logfile Entries

SiteKiosk logfiles are text files that contain runtime information about SiteKiosk. The logs are stored on the SiteKiosk client by default. If a SiteKiosk client is registered with a SiteRemote Server the log information is also transferred to the server, where it is used for the remote monitoring and management features of SiteRemote. This applies to SiteKiosk Windows (information can be found here) as well as SiteKiosk Android (the logs are under SiteKiosk\Logs on the sdcard of the device).

Besides containing information about SiteKiosk the logs can also be used to include entries from a website or an external application. This way you could for example generate a custom alert on a SiteRemote Server.

There are different ways to create SiteKiosk log entries from an external source, depending on the client, Windows or Android, and the type of the external source, either html code running in the SiteKiosk browser or another application.

In html code you can use the SiteKiosk Object Model, which is available in a Windows version and one for Android (the Android documentation is not publicly available yet but a preliminary version can be obtained by contacting PROVISIO support).

Note that all html examples require that the pages using the code are allowed to use the SiteKiosk Object Model. In the SiteKiosk Windows configuration you can configure this option under Access/Security -> URLs with Script Permission. In SiteKiosk Android you will find the option under Application -> Browser -> Script Permission (if you use another application option the path will vary).

Our first example demonstrates how to write a log message from a web page running in SiteKiosk Android:

	<script src="sitekiosk.min.js"></script>
		<input id="id_write" type="button" value="Write SiteKiosk Android Log Entry" />
	<script type="text/javascript">
		siteKiosk.ready(function (){
			document.getElementById("id_write").onclick = function () {writeLog();};
			function writeLog(){
				var lk_logfile = siteKiosk.log;
				lk_logfile.log(20,"TEST",0,"A test log message.");

The sitekiosk.min.js script file that is referenced in the above example can be obtained from PROVISIO support. If you are using SiteKiosk Android 2.4.118 you do not need the external script anymore, instead you can reference the internal script file that is included in the installation:

<script type="text/javascript" src="sk:///siteKiosk/siteKiosk.js"></script>

With the release of SiteKiosk Android 2.5 you have a third option to access the SiteKiosk Object Model, that does not require to link a script file at all:

	//method to initialize the SK Object Model as of SKA 2.5
	(new Function(_siteKiosk.getSiteKioskObjectModelCode()))();

The log method that is used to create the log entry has four parameters. The first is the log level, possible values are 0 (verbose), 10 (debug), 20 (info), 30 (warning) and 40 (error). Mostly you will work with either 10, 20 or 30. The second parameter is the facility that triggered the log message. For most log entries this is usually SiteKiosk. If you generate your own log entries you should use your own facility name, you can choose whatever name you want for it (though you should stick to a standard character set ;-)). The next parameter is the log type, you should either use 0, which stands for a generic log message, or choose one above 9000 as the rest is already used by SiteKiosk for internal log messages. The final parameter is the text string of the actual log entry.

The example for SiteKiosk Windows (see below for a script example for the new SiteKiosk Chrome Fullscreen Browser) is similar to the Android example with slight variations due to differences in the two SiteKiosk Object Model versions:

	<SCRIPT TYPE="text/javascript">
		function WriteToLog()
			SiteKiosk.Logfile.Write(9001,20,"TEST","A test log message.");
		<input type="button" value="WriteToLog" onclick="WriteToLog()">

The method used here is named Write and expects the same parameters as the Android log method, allthough in a different order. Further information can be found here.

Next is a script example for the new SiteKiosk Chrome Fullscreen Browser (available since SiteKiosk 8.91). The Object Model for the Chrome-based SiteKiosk browser is still in the making, but you can already write log messages. As you may note, this script has a lot of similarities with the Android version:

<!DOCTYPE html>
	<script type="text/javascript" src="file://C:/Program Files (x86)/SiteKiosk/SiteKioskNG/assets/siteKiosk/sitekiosk.js"></script>
		<input id="id_note" type="button" value="note" />
		<input id="id_warn" type="button" value="warn" />
		<input id="id_error" type="button" value="error" />
	<script type="text/javascript">
		siteKiosk.ready(function (){
			 document.getElementById("id_note").onclick = function () {writeLog('note');};
			 document.getElementById("id_warn").onclick = function () {writeLog('warn');};
			 document.getElementById("id_error").onclick = function () {writeLog('error');};
			function writeLog(caseid){
				var lk_logfile = siteKiosk.log;
					case "note":"TEST",0,"A test notification.");
					case "warn":
						lk_logfile.warn("TEST",0,"A test warning.");
					case "error":
						lk_logfile.error("TEST",0,"A test error.");

There are three different methods, info for informational messages, warn for warning messages and error for error messages. They all accept three parameters. The first is a string for the facility that triggered the log message. For most log entries this is usually SiteKiosk. If you generate your own log entries you should use your own facility name, you can choose whatever name you want for it (though you should stick to a standard character set ;-)). The next parameter is the log type, you should either use 0, which stands for a generic log message, or choose one above 9000 as the rest is already used by SiteKiosk for internal log messages. The final parameter is the text string of the actual log entry.

The SiteKiosk Object Model can also be used from other applications to generate log messages, e.g. applications written in C#. SiteKiosk must run in order for the other application to write to the log files and both applications must run under the same user. A C# example that writes to the SiteKiosk logs has a few more lines than the html versions:

using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using SiteKioskRuntimeLib;

namespace SKControl
    class Program
        [DllImport("ole32.dll", CallingConvention = CallingConvention.StdCall)]
        public static extern int CoGetClassObject(ref Guid rclsid, uint dwClsContext, IntPtr pServerInfo, ref Guid riid, out IntPtr ppv);

        public bool IsSiteKioskActive()

                returns false, if SiteKiosk is not currently running
                returns true, if SiteKiosk is running

            // initialize GUID's for classes and interfaces
            Guid lr_FactoryGuid = typeof(ISiteKioskFactory).GUID;
            Guid lr_FactoryClass = typeof(SiteKioskFactoryClass).GUID;
            Guid lr_SiteKioskGuid = typeof(ISiteKiosk).GUID;

            ISiteKiosk mk_pSiteKiosk;

            // try to get the ISiteKioskFactory interface of the instance
            // of SiteKioskFactoryClass
            IntPtr lk_FactoryPtr = new IntPtr();
            CoGetClassObject(ref lr_FactoryClass, 4, new IntPtr(), ref lr_FactoryGuid, out lk_FactoryPtr);
            if (lk_FactoryPtr == IntPtr.Zero)
                // SiteKiosk is not running
                return false;

            // convert the received IntPtr to the requested ISiteKioskFactory
            // interface
            ISiteKioskFactory lk_Factory = (ISiteKioskFactory)Marshal.GetObjectForIUnknown(lk_FactoryPtr);

            if (lk_Factory == null)
                return false;

            // call CreateSiteKiosk to get the ISiteKiosk interface of the
            // current instance of SiteKiosk
            IntPtr lk_SiteKioskPtr = new IntPtr();
            lk_Factory.CreateSiteKiosk(ref lr_SiteKioskGuid, out lk_SiteKioskPtr);

            if (lk_SiteKioskPtr == IntPtr.Zero)
                return false;

            // convert the received IntPtr to the requested
            // ISiteKioskFactory interface
            mk_pSiteKiosk = (ISiteKiosk)Marshal.GetObjectForIUnknown(lk_SiteKioskPtr);

            if (mk_pSiteKiosk == null)
                return false;

            // write to the SiteKiosk log file
            ILogfile2 lk_SKLog = (ILogfile2)mk_pSiteKiosk.Logfile;
            lk_SKLog.Write(9001, 20, "TEST", "A test log message from an external application.");

            return true;

        static void Main(string[] args)
            bool lb_ReturnValue = false; //false if SiteKiosk is not running, true if SiteKiosk is running; not used in this example
            Program lk_Prog = new Program();
            lb_ReturnValue = lk_Prog.IsSiteKioskActive();

As the C# example is basically using the SiteKiosk Windows Object Model the syntax of the Write method is the same as if you would use it in html code. Make sure to read the part about using the SiteKiosk Object Model in C# from the SiteKiosk Object Model documentation. Running the example code from within Visual Studio while SiteKiosk is running and the debug output window is enabled (SiteKiosk Windows configuration -> Logfiles -> Show output window) will give you something like this:

Note that you may need to build your C# application for an x86 target platform rather than any cpu, otherwise it may fail to detect SiteKiosk on a 64-bit system, because SiteKiosk runs as a 32-bit application.