I have following javascript code to run notepade.exe:
It's necessary to have two settings turned on.
You may experience a "Permission denied" error, which means that the browser will not let script execute outside the "sandbox". Try solving the issue by changing a security setting in the browser:
The above is for IE, but most browsers have similar options.