Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I perform a shell execute in a chrome extension?

I'm not finding a way to do this in the chrome.* API or even the experimental. It doesn't run through wscript so ActiveXObject("Shell.Application") isn't allowed.

I fear that my only option is to build a dll with NPAPI but I wanted to see if there was a simpler way.

like image 644
wtjones Avatar asked Sep 12 '10 15:09

wtjones


People also ask

How do I run a script in Chrome?

Press F12 to open the chrome developer tool and then click on the console tab. Logging in Script Area example: try writing console. log('Your message') and click Execute button or alternative you can use the log method directly like log('My Message'). Try executing this script on any page.


1 Answers

To update this for a fellow wary lonesome traveler, even NPAPI is deprecated and being phased out. One of the alternatives mentioned in the NPAPI decprecation blog post that looks suitable for this type of problem (and pretty nifty really) is the Native Messaging API.

like image 166
mgalgs Avatar answered Oct 12 '22 09:10

mgalgs