int ExecutePath (string, string, bool)

Executes the specified path with args and returns the process id of the new process

Security

Trust Level Required: Full Trust

Parameters

Name Description
path string
The full path of the command to run.
args string
The command line arguments to pass to the application.
asSystemUser (Optional) bool
Optional value that 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 as in JS syntax a single backslash is an escape character.

Examples


//Run a batch file from the userdata directory. When passing a full file path, rememeber to double up the slashes as in JS syntax a single backslash is an escape character.'
var pid = KioUtils.ExecutePath('cmd.exe', '/C "C:\ProgramData\KioWare Client\UserData\myBatchFile.bat"', 1);
var wnd = null;
while (!wnd) {
   wnd = KioUtils.GetProcMainWnd(pid);
}
KioUtils.BringWndToFront(wnd);
    

Requirements

KioWare for Windows version 8.12 or greater.