launch a system command via Javascript in Google Chrome -
i want execute local program on computer via javascript in chrome. in firefox, can done follows
var file = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); file.initwithpath(cmd); var process = components.classes["@mozilla.org/process/util;1"] .createinstance(components.interfaces.nsiprocess); process.init(file); process.run(false, args, args.length);
can please 1 me execute local program chrome extension?
thanks
you can't this. chrome's sandbox security model doesn't let arbitrarily execute programs on user's machine; extremely dangerous. theoretically possible using npapi, it's unlikely such plugin approved chrome web store. if private use create plugin using npapi , whatever want, wouldn't able distribute plugin through chrome web store.
Comments
Post a Comment