I need to run exe from my java application.So I wrote a.bat file and I call it from my java app. Batch file runs the exe. Here it is: String command = 'C: Users XXXX Desktop DenemeBat. Is it possible to include a set of instructions into a Windows batch file so that when opened, it will execute the byte code file for a Java program? I do not know if batch files need the compiled.class file, or if they use the source code, but I need it to be able to run it as it would in its development environment (without opening the IDE though). In my Java application, I want to run a batch file that calls 'scons -Q implicit-deps-changed build fileloadtype export fileloadtype' It seems that I can't even get my batch file to execute.
![Execute batch file powershell Execute batch file powershell](/uploads/1/2/6/4/126432984/843419811.png)
![Execute batch file through javascript Execute batch file through javascript](/uploads/1/2/6/4/126432984/963569938.png)
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:windowsadminftp
copy vnc.zip c:windowsadminftp
copy fire.zip c:windowsadminftp
extract .... c:windowsadminftpstart
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
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:windowsadminftp
copy vnc.zip c:windowsadminftp
copy fire.zip c:windowsadminftp
extract .... c:windowsadminftpstart
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
Share Flag
To add batch files to an HTML document, simply place the files name in an 'a href' command like this:
<a href='#file.bat'>Batch File</a>
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.
<a href='#file.bat'>Batch File</a>
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.
Share Flag
The code for adding batch files is a href(equal sign)'file.bat' add<and > around a href and the last '.
And then put the word Batch after the last>then place </a>
And then put the word Batch after the last>then place </a>
Share Flag
Hi,
Just create a batch file and save in the location where your html file is there.
<a href='test.bat'>TEST</a>
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.
But this is not unattended execution, I want that there should not be any prompt to open/save the batch file.
Thanks
Amit
Just create a batch file and save in the location where your html file is there.
<a href='test.bat'>TEST</a>
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.
But this is not unattended execution, I want that there should not be any prompt to open/save the batch file.
Thanks
Amit
Execute Batch File From Java Free
Share Flag
Execute Batch File From Java Program
Hi,
Try this:
WshShell = new ActiveXObject('WScript.Shell');
WshShell.Run('explorer file:///D:temp1.bat',1,true);
Best regards,
Yaacov Pinhas.
Try this:
WshShell = new ActiveXObject('WScript.Shell');
WshShell.Run('explorer file:///D:temp1.bat',1,true);
Best regards,
Yaacov Pinhas.
Share Flag