473,508 Members | 2,422 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting Multiple DOS Windows in Perl

4 New Member
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 1217
Andy202
4 New Member
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,509 Recognized Expert Moderator Specialist
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 New Member
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

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

Similar topics

7
1678
by: Miguel Manso | last post by:
Hi, list. I'm into a psicological doubt that I would like to share with you (you'll know why later on this mail). I'm a programmer with 5 year of experience into Perl. I'm on that point where...
3
6528
by: dpackwood | last post by:
Hello, I have two different scripts that do pretty much the same thing. The main perl script is on Windows. It runs and in the middle of it, it then calls out another perl script that then...
7
6833
by: codeslayer | last post by:
Greetings to everyone in ‘forum-land': I have a problem that has plaguing me to no end. It is a CSS-related question, and I have not seen this question posted anywhere in forums or through...
30
2743
by: Stuart Turner | last post by:
Hi Everyone, I'm working hard trying to get Python 'accepted' in the organisation I work for. I'm making some good in-roads. One chap sent me the text below on his views of Python. I wondered...
22
3676
by: Christopher Murtagh | last post by:
Greetings, I'm trying to write a pl/perl function that will return multiple rows. I've looked all over the web and only found vague references as to how to do this (some said it was possible,...
0
5745
by: OverTheTop | last post by:
All the usual Newbie stuff applies... I have a Windows2000 Server with ActivePerl and a module (DBD-Interbase) that worked fine. Trying to duplicate the environment on Windows2003 Server for...
1
8198
NeoPa
by: NeoPa | last post by:
A number of posters have asked to be shown how to produce a list of items from multiple records which are (potentially) grouped together. Take the following data for instance (from a table called )...
4
4979
by: jonniethecodeprince | last post by:
#This is a program from dummies.com $TheDB = 'edata.txt'; # Open the database file but quit if it doesn't exist open(INDB, $TheDB) or die "The database $TheDB could " . "not be found.\n"; ...
1
2600
by: Ant | last post by:
Hello! I am looking for a good hardcopy Perl book for newbies/beginners (including myself) who use Windows (not UNIX/Linux) and that isn't so old. After talking to my Linux friends who use Perl,...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7115
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7489
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1547
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
414
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.