Do you have a program that you want to be running all the time? I found this batch somewhere on the web. Props to whoever you are...
Yes - I am aware you can do this with Task Scheduler as well. I like a batch in the startup folder just fine. Simple. No fuss.
I had an issue with a file syncing program that should always be running (dropbox client). It crashes sometimes, and files fail to mirror to the cloud. Not good. So, here's a vbs to keep an eye on something you want to run all the time (it doesn't have to be dropbox). If the program you're watching ever crashes, this batch will restart it automatically. You can even custom set a timed pause in case of a Windows update or whatever. In this example, I have it set to 600000 milliseconds - which equals 10 minutes. That part is at the end of the batch. Set it to your desired time. Replace what's in blue according to what program you'd like to keep going. Note: Keep the the quotes in the batch:
set Service = GetObject ("winmgmts:")
set Shell = WScript.CreateObject("WScript.Shell")
sEXEName = "program.exe"
sApplicationPath = "C:\Program Location\Program.exe\"
'Loop until the system is shutdown or user logs out
bRunning = false
'Look for our application. Set the flag bRunning = true
'If we see that it is running
for each Process in Service.InstancesOf ("Win32_Process")
if Process.Name = "program.exe" then
'Is our app running?
if (not bRunning) then
'No it is not, launch it
Shell.Run Chr(34) & sApplicationPath & sEXEName & Chr(34)
'Sleep a while so we do not hog the cpu
TechTools IT Consultants - Located in Little Rock, AR.