run a batch file through javascript

Ads
 

run a batch file through javascript

How to run a batch file through javascript without prompting?

View Answers

September 14, 2011 at 5:14 PM

<html>
<head>
<script type="text/javascript">
function runApp(st) {
  WshShell = new ActiveXObject("WScript.Shell");
  WshShell.Run (st,1,false);
}
</script>
</head>
<body>
<!-- Two ways to create a link to run the app. -->
<font onClick="runApp('file://c:/winnt/notepad.exe');" style="cursor: hand;"><u>Notepad</u></font>
<br>
<!-- Or use <a> descriptor -->
<a href="runApp('file://c:/test.bat');">Batch File</a>
</body>
</html>

Ads









Related Tutorials/Questions & Answers:
run a batch file through javascript
run a batch file through javascript   How to run a batch file through javascript without prompting
Batch file for java application
Batch file for java application  please tell me how to create the batch file for java application(using swings).the application is created with netbeans
Advertisements
Take input in batch file
Take input in batch file  How to take input in batch file? Thanks   Hi, You can use the following line of code in your batch file: set /p myfile=Enter file name: In the above code myfile variable will hold the data
ModuleNotFoundError: No module named 'batch-run-cmd'
ModuleNotFoundError: No module named 'batch-run-cmd'  Hi, My... 'batch-run-cmd' How to remove the ModuleNotFoundError: No module named 'batch-run-cmd' error? Thanks   Hi, In your python
Using the escape percent in the batch file
Using the escape percent in the batch file   If you use the one % in the batch file it will consider it as the parameter input and will try to find the variable and replace it. But how to use the percentage in batch file
JavaScript loop through
JavaScript loop through     ... in understanding JavaScript loop through. We are using Java Script language as scripting language. The for loop execute and run the script till variable i 
JavaScript Open file
JavaScript Open file...; In this section, you will learn how to open and read the file in JavaScript. You can see in the given example, we have created a file component to let the user
how to run a .exe file in jsp
how to run a .exe file in jsp  i want code for to run a .exe file in jsp
JavaScript move file
JavaScript move file... the JavaScript method GetFile() with this object which returns the file...; In this section, we are going to move a file from one folder to another using
reading and displaying svg file through java
reading and displaying svg file through java  sample program for reading a svg file
read doc and docx file in javascript
read doc and docx file in javascript  How i read doc and docx file in javascript
javascript code for search in html file
javascript code for search in html file  Hi, I am looking for javascript code through which we can search data with specific name find in any rows in the table. Example: Id Name P001 A P002 B P003 C P004 P002 P005
Reading and querying an Excel file in JavaScript
Reading and querying an Excel file in JavaScript  Hi, I'm trying to read in an excel file, search a column for containing key words (entered... to JavaScript. Can anyone help ? Thanks
iterate through map and write the content in a separate file
iterate through map and write the content in a separate file  I am trying to save the data from file to a map, then iterate through map and write... through the above file and save it in maps depending on if it is a concept
iterate through map and write the content in a separate file
iterate through map and write the content in a separate file  I am trying to save the data from file to a map, then iterate through map and write... through the above file and save it in maps depending on if it is a concept
iterate through map and write the content in a separate file
iterate through map and write the content in a separate file  I am trying to save the data from file to a map, then iterate through map and write... through the above file and save it in maps depending on if it is a concept
Large File reading through Axis2 Web service
Large File reading through Axis2 Web service  This is Vinay Rai. This is regarding the web service help which i am looking for. I am currently working on axis2 web service and i am very new to this. so need your help
JavaScript write to text file
JavaScript write to text file  ... are going to create a file and write text into it using JavaScript. In the given example... it with the CreateTextFile(), a JavaScript method , which generates a file specified and returns
Time schedular for multiple batch file execution in java
Time schedular for multiple batch file execution in java  Hello All, i have a task in which i have to design a time schedular in java in which i can automate the batch file execution for the wholw day. For example i should have
downloading file through a file's path stored in database in jsp
downloading file through a file's path stored in database in jsp  hi want to download a file from a directory where the file location is stored... table,but i dont know hoe to download the file using its path stored
take variables in text file and run in java
take variables in text file and run in java  I have a text file which have variables 17 10 23 39 13 33 How to take "17"in java code
Jsp error when i run this a jsp file
Jsp error when i run this a jsp file  hi I got this error when i run the jsp file in IDE and outside also please help me java.lang.NullPointerException org.apache.jsp.insertjsp.jspInit(insert_jsp.java:22
JavaScript get excel file data
JavaScript get excel file data...; By the use of JavaScript we can get the excel file data as well. Here is the example which gets the data from the excel file with the cell and row index
Accessing Alert Messages through Resource bundle(properties file) in STRUTS2
Accessing Alert Messages through Resource bundle(properties file) in STRUTS2  Hi, I am facing these problem from a long run.Actually we... present i want to know,how to access alert messages through properties files
Running a stand alone application using batch file in windows
Running a stand alone application using batch file in windows  I have created a stand alone application and i have generated jar file for my... following command to run my application java -classpath ".\filecreate.jar
Print pdf file in JavaScript - IE and Chrome
Print pdf file in JavaScript - IE and Chrome  <!DOCTYPE html>...;!--Print pdf file in JavaScript - IE and Chrome (if not working in chrome add this html in war file of your server <script type="text/javascript">
how to call java script function through java class file
how to call java script function through java class file  how to call jframe in java script
Print pdf file in JavaScript - IE and Chrome
Print pdf file in JavaScript - IE and Chrome   <!DOCTYPE html> <html > <head> <script type="text/javascript"> function printPDF() { if (navigator.appName == 'Microsoft Internet Explorer
passing values between jsp file through hyperlink in div tag
passing values between jsp file through hyperlink in div tag  <...; &lt;script language="javascript"&gt; function validate...; &lt;script language="javascript"&gt; function gotoSearchProjAction
upload the text file through html and insert those data into the table
upload the text file through html and insert those data into the table ... contains lot of columns.text file also contains lot of data to insert into table.now i want to upload the text file through html and insert those data
How to run our application after deploying .war file in tomcat6.0
How to run our application after deploying .war file in tomcat6.0  I... created one html file,one servlet file and one web.xml file 2) Then I put all these files in appropriate directories. 3) I created .war file of my web

Ads