0

I am using this AutoCopy chrome extension as a framework for what I hope to be my own working extension. Basically, I want my extension to be able to shell out another script (VBScript) on the users file system (sending a parameter for it, too, if I can get that to work) So, I was hoping to use something to the effect of:

wsh = new ActiveXObject("WScript.Shell");
wsh.run("myscriptiwannarun.vbs");

but it is unresponsive in my extension. (the code snippet works when run as a standalone .js file, however.)

Note I was however able to sneak in an alert("test") in the extensions code and it worked fine. So, it feels like something is amiss in creating the ActiveX object.

Am I unable to create ActiveX objects in a chrome extension?

JohnZaj
  • 3,080
  • 5
  • 37
  • 51

1 Answers1

0

Try it

How to Enable ActiveX in Chrome?

Community
  • 1
  • 1
itsazzad
  • 6,868
  • 7
  • 69
  • 89
  • Interesting. After more research, I'm compelled to NOT to use ActiveX from the browser...and instead move my vbscript component into the javscript world. I'm going to do some more analysis. Thanks! – JohnZaj Jul 09 '11 at 20:05
  • Dear @itsazzad , How can I run a bat file in javascript for chrome? – Hosein Aqajani Dec 09 '15 at 07:25
  • 1
    @itsazzad , I found that `You are such a funny Genius` – Hosein Aqajani Dec 09 '15 at 09:48
  • @itsazzad I did a brute force search on google and stackoverflow and anywhere you think and then asked you, When you do not know sth it is better to be silent. – Hosein Aqajani Dec 09 '15 at 09:58