SCOUG-HELP Mailing List Archives
Return to [ 26 |
March |
2004 ]
<< Previous Message <<
>> Next Message >>
Date: | Fri, 26 Mar 2004 16:00:20 PST8PDT,4,1,0,3600,10,-1,0,7200,3600 |
From: | Harry Motin <hmotin@sbcglobal.net > |
Reply-To: | scoug-help@scoug.com |
To: | scoug-help@scoug.com |
Subject: | SCOUG-Help: killing one of several .cmd files |
5
=====================================================
If you are responding to someone asking for help who
may not be a member of this list, be sure to use the
REPLY TO ALL feature of your email program.
=====================================================
Content Type: text/plain
No, I understand that and I don't think that matters. Here's what he does:
1. He creates a single Rexx script to start each *.cmd program, one program at a time.
2. The script uses the DOSPIDLIST function that I previously discussed.
3. What he does is first get all of the process ID's before starting any of the *.cmd programs
4. Then, start the first *.cmd program. Look for a difference in the process ID's (i.e., a new ID, not present before). That is, continually loop on the DOSPIDLIST function until it registers a new process and says that pathname is "C:\OS2\CMD.EXE" (or, whatever is the pathname for cmd.exe on Peter's system).
5. That new process ID will be for the first *.cmd program that he just started.
6. Next, continue the script by having it start the next *.cmd program. Again, loop on the DOSPIDLIST function until you register a new process and the path is to CMD.EXE
7. Etc., etc.
I think the above will work!
HCM
Steven Levine wrote:
=====================================================
If you are responding to someone asking for help who
may not be a member of this list, be sure to use the
REPLY TO ALL feature of your email program.
=====================================================
In <20040326221741.25581.qmail@web80211.mail.yahoo.com>, on 03/26/04
at 02:17 PM, Harry Motin said:
>The scenario that I described to you, using the output of the 4 compound
>variables returned by the DOSPIDLIST is exactly what you need to locate
>and identify, by process ID #, the program that you want to kill. To
>repeat, you find the program by pathname in the second compound variable.
>Then, you find it by process ID in the first compound variable. Whatever
>program you want killed, you KNOW its pathname. Find it in the second
>variable. Whatever position it occupies in that compound variable, its
>process ID occupies the same position in the first variable. Then, use
>The DOSKILLPROCESS function to kill it, placing the find ID in that
>function.
You are missing the point that all the programs Peter is trying to kill
are named cmd.exe.
Steven
--
----------------------------------------------------------------------
"Steven Levine" MR2/ICE 2.41 #10183 Warp4/FP15/14.093c_W4
www.scoug.com irc.webbnet.info irc.fyrelizard.org #scoug (Wed 7pm PST)
----------------------------------------------------------------------
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-help".
For problems, contact the list owner at
"rollin@scoug.com".
=====================================================
Content Type: text/html
No, I understand that and I don't think that matters. Here's what he does:
1. He creates a single Rexx script to start each *.cmd program, one program at a time.
2. The script uses the DOSPIDLIST function that I previously discussed.
3. What he does is first get all of the process ID's before starting any of the *.cmd programs
4. Then, start the first *.cmd program. Look for a difference in the process ID's (i.e., a new ID, not present before). That is, continually loop on the DOSPIDLIST function until it registers a new process and says that pathname is "C:\OS2\CMD.EXE" (or, whatever is the pathname for cmd.exe on Peter's system).
5. That new process ID will be for the first *.cmd program that he just started.
6. Next, continue the script by having it start the next *.cmd program. Again, loop on the DOSPIDLIST function until you register a new process and the path is to CMD.EXE
7. Etc., etc.
I think the above will work!
HCM
Steven Levine <steve53@earthlink.net> wrote:
===================================================== If you are responding to someone asking for help who may not be a member of this list, be sure to use the REPLY TO ALL feature of your email program. =====================================================
In <20040326221741.25581.qmail@web80211.mail.yahoo.com>, on 03/26/04 at 02:17 PM, Harry Motin said:
>The scenario that I described to you, using the output of the 4 compound >variables returned by the DOSPIDLIST is exactly what you need to locate >and identify, by process ID #, the program that you want to kill. To >repeat, you find the program by pathname in the second compound variable. >Then, you find it by process ID in the first compound variable. Whatever >program you want killed, you KNOW its pathname. Find it in the
second >variable. Whatever position it occupies in that compound variable, its >process ID occupies the same position in the first variable. Then, use >The DOSKILLPROCESS function to kill it, placing the find ID in that >function.
You are missing the point that all the programs Peter is trying to kill are named cmd.exe.
Steven
-- ---------------------------------------------------------------------- "Steven Levine" MR2/ICE 2.41 #10183 Warp4/FP15/14.093c_W4 www.scoug.com irc.webbnet.info irc.fyrelizard.org #scoug (Wed 7pm PST) ----------------------------------------------------------------------
=====================================================
To unsubscribe from this list, send an email message to "steward@scoug.com". In the body of the message, put the command "unsubscribe scoug-help".
For problems, contact the list owner
at "rollin@scoug.com".
=====================================================
<< Previous Message <<
>> Next Message >>
Return to [ 26 |
March |
2004 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
|