Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7813377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:50:24+00:00 2026-06-02T04:50:24+00:00

Colls, hello. My javascript run an external .bat file: var objShell = new ActiveXObject(Shell.Application);

  • 0

Colls, hello.
My javascript run an external .bat file:

var objShell = new ActiveXObject("Shell.Application");
        objShell.ShellExecute("start.bat", "Main.bat c:\pr  ext.dat ", "C:\\PR\\", "open", "1");

Start.bat file works five minutes. And after that my script continue execute other commands.
My question is «how to ask (let him know) javascript to wait an end of executing Start.bat file?»

The naxt code is not very suitable in my case:

var date = new Date();
var curDate = null;

do { curDate = new Date(); } 
while(curDate-date < millis);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T04:50:26+00:00Added an answer on June 2, 2026 at 4:50 am

    If you’re sure about the time your Main.bat needs to execute, you can use this:

    WScript.Sleep(50000);
    

    WSH Language reference: http://msdn.microsoft.com/en-us/library/98591fh7(v=vs.84).aspx

    Sleep method: http://msdn.microsoft.com/en-us/library/6t81adfd(v=vs.84).aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I have a php code which by echo calls the javascript function expand(txt)
Hello I have this code where i create an xlsx file and i need
Hello how would I create this in Javascript?: You have <strong><span id=commentsCounter>${const['COMMENT_MAX_LENGTH']}</span></strong> characters left.<br/>
Sort of a novice javascript person reading a backbone.js tutorial http://arturadib.com/hello-backbonejs/docs/5.html and have a
My application makes several calls to an Action method (ASP .NET MVC) which returns
I'm trying to convert a simple Spring 2.5 hello world project (from Spring Recipes)
I have written a Hello, world program with JNI. Java calls c program with
Hello i have designed a maze and i want to draw a path between
hello i'm trying to get the first value of a datagrid cell value but
Hello fellow coders & codetts I was wondering, if I needed to create a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.