int Execute(string, bool)

Executes the specified command line.

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.

Note that, even when run as the SYSTEM user, the process will run interactively in the current user session.
When passing a full file path, remember to double up the slashes like so: C:\dir1\dir2\myprogram.exe.

When running a command by name that you intend to be found via the system PATH, you MUST include the executable extension: .exe, .bat, .com; ExecutePath does not have this restriction.

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.