int FindWnd(string, string)

Searches for a top-level window by title and class name


Trust Level Required: Full Trust


Name Description
title (Optional) string
The window title. Defaults to null.
className (Optional) string
The window class name. Defaults to null.


The window handle, or 0.


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.

Window titles and class names can be typically be found in the menu bar of the window, or by using utilities such as Spy++.


var pid
var wnd = null

if(!pid) pid = KioUtils.Execute('notepad.exe')
var wnd = null
while (!wnd) {
	wnd = KioUtils.GetProcMainWnd(pid)
//If the above code is run from an external source or CustomToolbarCode.js, then you can 
//find the window with Javascript injected from the Configuration Tool:
var handle = KioUtils.FindWnd('Untitled - Notepad', 'Notepad')
if(handle > 0) KioUtils.CloseWnd(handle)


KioWare for Windows version 8.5 or greater.