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

  • Home
  • SEARCH
  • 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 8133463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:36:44+00:00 2026-06-06T09:36:44+00:00

I hope that you can help me. When I want to execute those .bat

  • 0

I hope that you can help me. When I want to execute those .bat files, I can see that the files are executed but I can get only the first one, the second one or the others I can’t get them, I have no problem with my batch files, I’ve tried to executed them one by one and it works.

 string str_Path = Server.MapPath(".") + "\\execute.bat";
 string str_PathN= Server.MapPath(".") +"\\executeN.bat";
 string str_PathHD = Server.MapPath(".") + "\\executeHD.bat";
 string str_PathFHD = Server.MapPath(".") + "\\executeFHD.bat";

 ProcessStartInfo processInfo = new ProcessStartInfo(str_Path);
 processInfo.UseShellExecute = false;
 Process batchProcess = new Process();
 batchProcess.StartInfo = processInfo;
 batchProcess.Start();
 Thread.Sleep(3000);

 ProcessStartInfo hd = new ProcessStartInfo(str_PathHD);
 hd.UseShellExecute = false;
 Process batchProcessHD = new Process();
 batchProcessHD.StartInfo = processInfo;
 batchProcessHD.Start();
 Thread.Sleep(3000);
 ...
  • 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-06T09:36:45+00:00Added an answer on June 6, 2026 at 9:36 am

    Why don’t you

    public static void runBatch( string path, int sleepTime = 3000 )
    {
       ProcessStartInfo psi = new ProcessStartInfo( path );
    
       psi.UseShellExecute = false;
    
       Process proc = new Process();
       proc.StartInfo = psi;
    
       proc.Start();
       Thread.Sleep( sleepTime );
    }
    
    
    main()
    {
        runBatch(Server.MapPath(".") + "\\execute.bat");
        runBatch(Server.MapPath(".") +"\\executeN.bat");
    ...
    }
    

    Or a better version of runBatch:

    public static void runBatch( string path )
    {
       ProcessStartInfo psi = new ProcessStartInfo( path );
    
       psi.UseShellExecute = false;
    
       Process proc = new Process();
       proc.StartInfo = psi;
    
       proc.Start();
       proc.WaitForExit();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a little problem and hope that you can help me. I want
I hope you can help me. I have a web service that needs to
I am stuck with a design problem that I hope you guys can help
wonder if someone can help me i know what i want to achive but
I hope somebody can help me here, I have a table that has the
I am sitting with a problem and hope that you can help me.I'm implementing
Hope that someone out there can help with this! I'll give an example based
I hope that someone can help me with this. As you know when an
I have a problem with CodeIgniter .htaccess file and hope that somebody can help
Is there any way (utilizing Reflection I hope) that I can make an instantiated

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.