How to execute bat file from HTML or Javascript
Any one can answer me how to execute a bat file from HTML, XTML or Javascript. Is there any command for that.
Thanks in advance
Software
Any one can answer me how to execute a bat file from HTML, XTML or Javascript. Is there any command for that.
Thanks in advance
by jeremyrem
ur best bet would be either converting the app to javascript and running it that way or rooting it.. only if it is your own computer or you do have consent to do so.. because it is a federal crime..
first u would need to assemble a group of programs you would need. such as cuteftp..
mainly for the support of the exec command.. with lets you upload a file and then execute it on the target computer. aka ur office computers say if you were to do a mass upgrade of software..
second i recommend a silent version of tightvnc.. because sometimes i like to see windows instead of commandline.(ftp) now vnc is hard to turn into a service without already being installed mainly for the password part.. with is located in the regisitry..
third... FireDaemon. what is used to create windows services' entries. a few bat files to berun to combine all the services/programs. such as something easy as
run.bat
copy ftp.zip c:\windows\adminftp
copy vnc.zip c:\windows\adminftp
copy fire.zip c:\windows\adminftp
extract .... c:\windows\adminftp\start
second.bat
second.bat
install the services..(its about 4:00am and im kinda tired. nolonger have the programs installed)
so just run the FireDaemon program in cmd to find the command lines.. and create the services
then of course.. the third.bat for when it accidently goes down..
third.bat
netstart "servicename"
and that is how you root your computer.. for administrative purposes only
and the programs i have listed work best when you have the full version.. it does not pay to pirate. in reality you hurt ur self with not getting as quality as products in the future
To add batch files to an HTML document, simply place the files name in an "a href" command like this:
Batch File
The # sign tells the computer that the link is internal and not external, so the computer won't try to search the World Wide Web for your file.
The code for adding batch files is a href(equal sign)"file.bat" add around a href and the last ".
And then put the word Batch after the last>then place
by _amitchandan
Hi,
Just create a batch file and save in the location where your html file is there.
TEST
this anchor tag will execute the (test.bat) batch file. After clicking on the link , you will get the window prompting to open/save/close, if you will click on open then batch file will be executed.
But this is not unattended execution, I want that there should not be any prompt to open/save the batch file.
Thanks
Amit
Hi,
Try this:
WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run("explorer file:///D:\\temp\\1.bat",1,true);
Best regards,
Yaacov Pinhas.
This discussion is closed to new replies.
Sort by Trending