By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,834 Members | 2,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,834 IT Pros & Developers. It's quick & easy.

Getting Multiple DOS Windows in Perl

P: 4
Getting a new DOS Windows for each batch file that is run.

Expand|Select|Wrap|Line Numbers
  1. print "Starting Server\n";
  2. start sever= system("cmd /c runserver.bat");
  3. sleep(2);    # 2 seconds        
  4.  
  5. print "Starting Client1\n";
  6. start runclient1 = system("cmd /c runclient1.bat");
  7.  
  8. print "Starting Client2\n";
  9. start runclient2 = system("cmd /c runclient2.bat");
How do you get a separte DOS window for each program?

Andy.
Jun 12 '08 #1
Share this Question
Share on Google+
3 Replies


P: 4
Found how to de it:-

Expand|Select|Wrap|Line Numbers
  1. print "Starting Server\n";
  2. $runserver = system("cmd /c start runserver.bat");    # Start in new DOS window
  3. sleep(2);    # 2 seconds    
But would like to be able to set the Window title?

Andy
Jun 13 '08 #2

numberwhun
Expert Mod 2.5K+
P: 3,503
Found how to de it:-

Expand|Select|Wrap|Line Numbers
  1. print "Starting Server\n";
  2. $runserver = system("cmd /c start runserver.bat");    # Start in new DOS window
  3. sleep(2);    # 2 seconds    
But would like to be able to set the Window title?

Andy
Well, looking at the documentation for cmd.exe, it doesn't look like it has an option to do that. I don't know of any other way to do it either.

If you want, you can post in the Windows forum and ask there, but don't mention that its for Perl or they will move it over here. Just mention that you are using the cmd command to start a window from a script and need to know how to set the title of the window. That's all.

Regards,

Jeff
Jun 13 '08 #3

P: 58
Well, looking at the documentation for cmd.exe, it doesn't look like it has an option to do that. I don't know of any other way to do it either.

If you want, you can post in the Windows forum and ask there, but don't mention that its for Perl or they will move it over here. Just mention that you are using the cmd command to start a window from a script and need to know how to set the title of the window. That's all.

Regards,

Jeff
You should be able to just add these lines at the top of your bat file yes

@ECHO OFF
title <whatever you want your tile to be>

Eric
Jun 13 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.