Company Christmas Holidays
North American Headquarters in Miami, USA: Dec 25, 2015, Jan 1st 2016
European Headquarters in Muenster, Germany: Dec 21, 2015 until Jan 03rd 2016
Limited support is available during this period.
We at PROVISIO wish you Merry Christmas and a Happy New Year!

 

FAQ: Autostart of a batch or cmd file AFTER SiteKiosk has been started

Description

Generally are 2 main issues you also have to consider when you want to run batch/cmd files within the SiteKiosk user account:

1. You have to allow the usage of the “cmd.exe” application via System-Security-Manager (-->Customized-->Programs).
2. You have to allow the display of the command line window by deleting the window class entry “ConsoleWindowClass” in the Windows & Dialogs Management settings of the SiteKiosk configuration. (-->Access/Security-->Block system critical windows & dialog boxes-->Settings)

Then you should start the batch/cmd file by using “WshShell.Run (Run Method of Windows Script Host- http://msdn.microsoft.com/en-us/library/d5fk67ky%28VS.85%29.aspx) with using an external script you add to the SiteKiosk configuration (-->Browser Design-->Advanced-->Execute Script)

BASIC EXAMPLE:
- The external script:
Use an editor (e.g. Notepad) to create a JS file (e.g. startcmd.js) and copy these lines to the file.

evtid = SiteKiosk.Scheduler.AddDelayedEvent(5000, start);

function start()
{
var WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run("\"C:/Program Files (x86)/startapp.cmd\"",1,false);
}

Continue by simply saving the JavaScript file you created to the directory ...SiteKiosk\Html\ and add it to the SiteKiosk configuration as an external script (-->Browser-->Browser Design-->Advanced-->Execute Script File).


- The cmd file:
Use an editor (e.g. Notepad) to create a CMD file (e.g. startapp.cmd) and copy these lines to the file.

c:
cd \
cd Windows
cd system32
start notepad.exe
pause

Continue by simply saving the you created to the “Program Files (x86)” folder (C:/Program Files (x86)/startapp.cmd).

Description:
The external script (startcmd.js) will start the CMD file (startapp.cmd) 5 seconds after SiteKiosk has been started. Within the CMD file Notepad will be executed.

Please note that the script above is merely an example. When you implement your own application, you may have to observe certain user access rights.
These include “read AND write access“ to the corresponding directories.

If necessary, you can use the System Security Wizard to adjust this and other rights for the SiteKiosk user

Answer: (0)

No answers/comments