0

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?

1
  • What have you tried so far? Show us some code. Commented Apr 23, 2020 at 18:25

1 Answer 1

0

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.

Main Code for Refresher activity

Hope it will help you.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.