bool KillProc (int)

Kills the specified process

Security

Trust Level Required: Full Trust

Parameters

Name Description
pid int
The ID of the process to be terminated

Return

True on success

Remarks

IMPORTANT: While KioWare can be used to open 3rd party applications it cannot guarantee any security of your kiosk while these applications are in use.

It is also possible to show a taskbar with all open apps via the User Interface section of the Configuration Tool. With KioWare running in shell mode, as is recommended, the start menu will still be disabled.

Examples


//this example is intended to run in the CustomToolbarCode.js file in the UserData directory
//The purpose is to run a process for the duration of each user session
var _onSessionBegin = OnSessionBegin, _onSessionEnd = OnSessionEnd, pid;
var wnd = null;
window.OnSessionBegin = function(sessId){
	if(!pid) pid = KioUtils.Execute('notepad.exe');
	var wnd = null;
	while (!wnd) {
		wnd = KioUtils.GetProcMainWnd(pid);
	}
	KioUtils.BringWndToFront(wnd);
}

window.OnSessionEnd = function(){
	KioUtils.KillProc(pid)
	_onSessionEnd();
	_sessId = null;
}

Requirements

KioWare for Windows version 8.5 or greater.