I have a VB.NET windows service that I created to start another VB.NET application on a virtual machine reboot.
How can I use the VB.NET windows service to check if the application is running and stop or restart the application?
I have a VB.NET windows service that I created to start another VB.NET application on a virtual machine reboot.
How can I use the VB.NET windows service to check if the application is running and stop or restart the application?
See CheckApp - by me I've coded this Windows service application to check every 5000ms (5 seconds) if a specified process running. You can modify the code with your own relevant processes (e.g. starting that process again if stopped.)
You can install the service using InstallUtil from Tools > Command Line > Developer Command Prompt in order to deploy the service.
Make sure you have logged on as Administrator on Visual Studio.
As soon as the service starts, the timer Refresher starts which does your required work.
Go to Services and find App Checker after installing it, then finally enable it.
Hope it will help you.