0

I want to call a local exe in Windows from my local HTML page (via JavaScript). All the years I used ActiveXObjects like:

myObject = new ActiveXObject( "WScript.Shell" ); function RunCTG(wiNumber) { filename = "\"D:\\Tools\\MyTool.exe\""+" -WINumber="+wiNumber;

myObject.Run(filename);

ActiveXObjects work only in Internet Explorer - thus I have to use IE for this task. Ok. But since Windows 11, there is no IE anymore.

Are there other ways, to call a Windows exe from a local JavaScript?

Konrad
  • 4,329
  • 10
  • 54
  • 88
  • [Probably not](https://www.google.com/search?q=call+a+Windows+exe+from+a+local+JavaScript+site:stackoverflow.com) – mplungjan Feb 21 '22 at 12:47
  • 1
    @mplungjan `s/Probably/Hopefully/` – Andreas Feb 21 '22 at 12:48
  • Do you limit JavaScript executed in Browser? If you consider NodeJs, it is possible. https://stackoverflow.com/questions/10179114/execute-powershell-script-from-node-js – ikhvjs Feb 21 '22 at 13:00
  • 1
    If you want to use JavaScript, I think the only way is to register a custom protocol URI Scheme like [this answer](https://stackoverflow.com/questions/37415841/how-to-run-local-program-exe-via-chrome-via-html-javascript/37416124#37416124). But you need to edit the registry on every machine needs to run the JavaScript. – Yu Zhou Feb 22 '22 at 05:49

0 Answers0