468,321 Members | 1,654 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,321 developers. It's quick & easy.

Getting Multiple DOS Windows in Perl

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
3 1057
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
3,503 Expert Mod 2GB
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
erbrose
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.

Similar topics

7 posts views Thread by Miguel Manso | last post: by
30 posts views Thread by Stuart Turner | last post: by
22 posts views Thread by Christopher Murtagh | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by howard w | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.