|
| ||||||||||
| Tags: bat file |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| ||||
| ||||
| Automation Question: How do you stop a process from a .bat file?
|
|
#2
| ||||
| ||||
|
Normally, the xnets.exe is the name of the executable, not necessarily the service name. The service name is shown in the list of services; right click on a service and click properties and then the service name is shown. When the service name has blanks in it, then you will have to use double quotation marks in the "net stop" command, for example - net stop "service name". |
|
#3
| ||||
| ||||
| Re: Automation Question: How do you stop a process from a .bat fil
Thank you, I have checekd the XNETS which is the name of the service, and it does work in the script file. |
|
#4
| ||||
| ||||
| Re: Automation Question: How do you stop a process from a .bat fil
You can also try to use "sc stop" instead of "net stop". For processes, download the Process Utility tool. Below are the Command Line Process Viewer/Killer/Suspender Usage: ProcessUtility.exe [-v] [-t] [-c] ProcessUtility.exe [-q] [Process Name/PID] [timeout sec(optional)] ProcessUtility.exe [-k] [-s] [-r] [Process Name/PID] ProcessUtility.exe [-p] [Process Name/PID] {RealTime|High|AboveNormal|Normal|BelowNormal|Low} ProcessUtility.exe [-a] [Process Name/PID] [Mask(To Set)] -v View Processes. -t View Kernel and User CPU Times. -c View Process Creation Times. -q Send WM_CLOSE Message. Default timeout is 60 Sec -k Kill Process. (Terminate) -s Suspend Process. -r Resume Suspended Process. -p Set Process Priority. -a Get/Set Affinity Mask of Process. PROCUTIL -q [PID] 5 |
|
#5
| ||||
| ||||
| Re: Automation Question: How do you stop a process from a .bat fil
Thanks for that, I will try to do what you have suggested, since I have a script file that works most of the time, occasionally it fails to stop Xnets. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Automation Question: How do you stop a process from a .bat file?" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to stop the process PreferenceSyncClient | Piyush.P | Windows Software | 5 | 31-05-2011 11:57 PM |
| Automation of Word and background process mutually fails | Gechina | Operating Systems | 6 | 19-04-2011 10:36 PM |
| Cannot stop Process Respawns | Inception | Operating Systems | 3 | 12-01-2011 02:06 AM |
| Question about Upgrading Process of Thinkpad T60 | Illinois | Portable Devices | 6 | 23-06-2010 06:03 AM |
| How to Stop the Windows Shutdown Process | Apacer | Operating Systems | 3 | 23-05-2009 06:39 PM |