int Execute (string, bool)

Executes the specified command in a terminal

Security

Trust Level Required: Full Trust

Parameters

Name Description
cmdLine string
The command to execute.
asSystemUser (Optional) bool
Indicates whether to execute as the SYSTEM user or not. Defaults to false.

Return

The process id or 0.

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.

This function can be used to pass commands to the terminal such as 'notepad.exe'. Note that the process will still run interactively in the current user session.
When passing a full file path, remember to double up the slashes such as 'C:\dir1\dir2\myprogram.exe'.

Examples


var pid = KioUtils.Execute('notepad.exe');
var wnd = null;
while (!wnd) {
   wnd = KioUtils.GetProcMainWnd(pid);
}
KioUtils.BringWndToFront(wnd);
    

Requirements

KioWare for Windows version 8.1 or greater.