This function allows you to run any command against the local PC's command interpreter. You can use this to launch PC-side programs.
Any standard windows environment variables can be built right into the command string. The applet will resolve them to their actual values before the command is run.
If for some reason the command cannot be executed successfully, an error message will be displayed in the browser using an alert box. This might happen, for example, if the program you are trying to run is not installed on the local PC.
var command = "%PROGRAMFILES%\\Vendor XYX\\XYZImagingProgram.exe"; pui.runPCCommand(command); // this will run XYZImagingProgram.exe // Or... // This is another way to do the same thing, it's the same function... runPCCommand(command);
pui.runPCCommand("notepad.exe"); // this will open up an empty notepad document // Or... // This is another way to do the same thing, it's the same function... runPCCommand("notepad.exe");
pui.runPCCommand("calc.exe"); // this will run the system's calculator // Or... // This is another way to do the same thing, it's the same function... runPCCommand("calc.exe");