PDA

View Full Version : Closing Services & Processes prior to gaming (WXP-Pro)



AmateurSysTech
06-22-2004, 09:51 AM
I have used the NET STOP commands to create a batch file to stop all unrequired services prior to starting a game.

I now want to be able to stop processes from within the batch file.

Can someone tell me or point me to a place where I can do this, I have tried a program called "CloseApp" but it cannot close some of the app's

I am a Windows XP user that knows more about Windows PC's than many around me, and as so I am often called upon to help them with their problems as the professional support in my area is untrustworthy. It also never hurts to learn more tho'

jdharm
07-27-2004, 09:07 AM
You could use the following code, repeat for each service (except the first 2 lines), and save the file as a .vbs:

dim SrvName

On error resume next

SrvName = "<font color=blue>Service Name</font color=blue>"

For Each strService In GetObject("winmgmts:").InstancesOf("win32_service")

If strService.Name = SrvName Then
strService.StartService

End If
Next


Josh

<font color=red>NEW!
IMPROVED!
SOON TO BE NEGLECTED AGAIN!</font color=red>
<a target="_blank" href=http://www.jdharm.net>www.jdharm.net</a>