Free windows macro needed

ghalied

Senior Member
Joined
Jan 31, 2006
Messages
735
Reaction score
2
Hi

I am looking for a free, uncomplicated macro to stop a service and to close and re-open the application to enable it to unlock the files needed on a backup routine. I get 2 file failures in the morning backup report and guess what, they are critical .dat files.

I've been messing round with PowerPro but it's to long winded, just want something simple, any links?
 
Use this in a batch file, run as a scheduled task.

sc \\machinename stop "Service Name"
sc \\machinename start "Service Name"

I'm assuming you have priveleges to start and stop services. sc is the Windows XP service control program. In a domain can be used to start and stop any service on any machine on the domain. Use it to restart our ERP package every night, to flush the user cache.

To close the app,

TASKKILL.EXE /F /IM "App Name"
and to reopen is easy enough to do.

With the service I suggest stopping in one batch file, wait 2 mins, and close app. Then restart service, wait another 2 mins, and start app again. 3 .bat files in your scheduler.

If sc and taskkill are not in your windows dir, you may need the Windows Server Admin toolkit from MS. Free download
 
Top
Sign up to the MyBroadband newsletter
X