You can use this
function RunFile(path) {
WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run(path, 1, false);
}
<input type="button" value="Run Notepad" onclick="RunFile('c:\windows\notepad.exe');"/>
<input type="button" value="Run Paint" onclick="RunFile('c:\windows\system32\mspaint.exe');"/>
Or a different approach. Create variables for app path
var notepad = "c:\windows\notepad.exe";
var paint = "c:\windows\system32\mspaint.exe";
and pass them to the function
<input type="button" value="Run Notepad" onclick="RunFile(notepad);"/>
<input type="button" value="Run Paint" onclick="RunFile(paint);"/>