Is it possible to run bat/executable file using html5 button event? In IE its achievable using Shell object if I am not wrong.
Just create a batch file and save in the location where your html file is there. this anchor tag will execute the (test. bat) batch file. After clicking on the link <TEST>, you will get the window prompting to open/save/close, if you will click on open then batch file will be executed.
The simplest way is like this (this is somewhat close to what you tried already): var wshShell = new ActiveXObject("WScript. Shell"); wshShell. Run("D:\\dir\\user.
HTML Executable is a versatile HTML compiler ("html to exe" or "pdf to exe"): it lets you transform entire websites, HTML documents, PDF files and their companion files into real software .exe files. End users run the compiled software as easily as they would run any EXE file.
Converting BAT Scripts to EXE with Bat To Exe Converter If you're not into performing tedious steps like IExpress, a popular third-party tool converts . bat to .exe file and is more effective and convenient. Bat To Exe Converter is a free yet handy tool that quickly converts one or several .
No, that would be a huge security breach. Imagine if someone could run
format c:
whenever you visted their website.
Here's what I did. I wanted a HTML page setup on our network so I wouldn't have to navigate to various folders to install or upgrade our apps. So what I did was setup a .bat file on our "shared" drive that everyone has access to, in that .bat file I had this code:
start /d "\\server\Software\" setup.exe
The HTML code was:
<input type="button" value="Launch Installer" onclick="window.open('file:///S:Test/Test.bat')" />
(make sure your slashes are correct, I had them the other way and it didn't work)
I preferred to launch the EXE directly but that wasn't possible, but the .bat file allowed me around that. Wish it worked in FF or Chrome, but only IE.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With