[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 747
  • Last Modified:

How to create a batch file to kill processes and restart them

We have an application used in the enterprise that will bog down when used for extended periods of time (weeks) without a reboot etc.

I'd like to make a shortcut to a batchfile for all users that will quickly kill the (slxsystem.exe and SALESLOGIX.exe) and then re-start them, or essiently restart the application (thereby launching %windir%\System32\cmd.exe /c start "runhigh" /high "C:\Program Files\SalesLogix\Saleslogix.exe" )


I'd like to request assistance for a batch file that performs the requested actions above, thanks!
0
SP3CLt
Asked:
SP3CLt
  • 3
  • 2
  • 2
  • +1
2 Solutions
 
oBdACommented:
Assuming XP or W2k3:


@echo off
echo Restarting SalesLogix ...
taskkill.exe /f /im "slxsystem.exe" /im "saleslogix.exe"
start "runhigh" /high "%ProgramFiles%\SalesLogix\Saleslogix.exe"

Open in new window

0
 
AmazingTechCommented:
Does saleslogix.exe also start slxsystem.exe?
TASKKILL /F /IM slxsystem.exe /IM saleslogix.exe
%windir%\System32\cmd.exe /c start "runhigh" /high "C:\Program Files\SalesLogix\Saleslogix.exe"

Open in new window

0
 
AmazingTechCommented:
Oh yeah I guess I didn't need the cmd.exe either.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
SP3CLtAuthor Commented:
Wow, both of those batch files work great!
Can I request a pre-message to be included before the batch file initializes?
 
I'd like to include "Warning, any unsaved notes, or activities will be lost during the saleslogix refresh - press any key to continue."
0
 
AmazingTechCommented:
OK.
echo Warning, any unsaved notes, or activities will be lost during the saleslogix refresh
pause
TASKKILL /F /IM slxsystem.exe /IM saleslogix.exe
%windir%\System32\cmd.exe /c start "runhigh" /high "C:\Program Files\SalesLogix\Saleslogix.exe"

Open in new window

0
 
oBdACommented:

@echo off
echo Warning, any unsaved notes, or activities will be lost during the saleslogix refresh.
echo Press any key to continue, or ^<Ctrl-C^> to abort.
pause >NUL
taskkill.exe /f /im "slxsystem.exe" /im "saleslogix.exe"
start "runhigh" /high "%ProgramFiles%\SalesLogix\Saleslogix.exe"

Open in new window

0
 
SP3CLtAuthor Commented:
Thank you verymuch - great work!
0
 
alexr54Commented:
How would you make this for a remote machine?

and multiple processes?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now