79523615

Date: 2025-03-20 16:59:32
Score: 3
Natty:
Report link

Thank you Bill Stewart ! I really liked the solution you showed on how to run a *.bat file from JS/PHP.

I've tried to implement it but unfortunately Nothing Happens when I click the button: Play example.

Here's my code:

<script language="Javascript" type="text/javascript"> 
var wshShell = new ActiveXObject('WScript.Shell');
</script>

My PHP code includes:

echo "<input id='btnExplore' type='button' value='Play example' 
onclick='wshShell.Run('C:\\tools\\Play Example.bat');";

The Clipboard holds the correct adress to the source to play, like C:\tools\example.avi

I really would appreciate a comment from you or any other expert.

Cheers, Torbjorn

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (1): Cheers
  • Blacklisted phrase (1.5): would appreciate
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user3437733