Stopping a running process 
Author Message
 Stopping a running process

I just switched software from an NT machine to a Windows 98 machine and
some of my scripts (previously written in Perl) no longer work. I was
making use of "net stop" to stop processes in NT. This command is not
in Windows 98 and I was wondering if I could do this in WSH.
What I need to do is to stop three different programs, rename a file
and then start the three programs again.
It is a log rotation script. I currently cannot accomplish this,
because the log is being written to by the open programs.
Must I write the script to start the programs in order to shut them
down or can I use an object reference to find them?
Any help would be appreciated, I read the MSDN article on scripting and
didn't see this, but maybe I overlooked something.
--
Kevin Devine
Webmaster, Osborn International
http://www.*-*-*.com/

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sat, 21 Sep 2002 03:00:00 GMT  
 Stopping a running process
Not being familiar with "net stop", does it mean "suspend" or "close"???

If it means close, then there are a number of ways to do that with wsh.
Probably the most simple way is just to AppActivate each app, then use
sendkeys to send alt-F4 to close the app.

hth, jw

Quote:

> I just switched software from an NT machine to a Windows 98 machine and
> some of my scripts (previously written in Perl) no longer work. I was
> making use of "net stop" to stop processes in NT. This command is not
> in Windows 98 and I was wondering if I could do this in WSH.
> What I need to do is to stop three different programs, rename a file
> and then start the three programs again.
> It is a log rotation script. I currently cannot accomplish this,
> because the log is being written to by the open programs.
> Must I write the script to start the programs in order to shut them
> down or can I use an object reference to find them?
> Any help would be appreciated, I read the MSDN article on scripting and
> didn't see this, but maybe I overlooked something.
> --
> Kevin Devine
> Webmaster, Osborn International
> http://www.osborn.com

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Sun, 22 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Stop processing of ASP-script

2. Stop processing

3. Stopping another process and minimizing/maximizing/restoring

4. Stopping a Service or Killing a Process with VBScript and WMI in ASP

5. Start and Stop processes

6. how to stop a process

7. Stop, Stop, Stop..... Please HELP (code included)

8. How to stop execution run-time and relocate

9. flash file: how to stop multilple runs?

10. Stopping VBScript run by the ScriptControl

11. START/STOP/ displayed Services running on PC thu an ASP page

12. Script stops after WshShell.Run

 

 
Powered by phpBB® Forum Software