Click here to Skip to main content
15,880,469 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working on an (console) application, which should be executed on startup and keeps running all the time in the background (executing something every 30 minutes).

How can I, in another (device) application, check if my console application is running (and start it if its not)?

I am using VB.NET CF 2.0 and everything is being deployed on a device running WM 6.5 (32bit)
All the code examples I found where only available on the "standard" .NET.
Posted
Comments
Sergey Alexandrovich Kryukov 2-Jan-14 11:41am    
Why doing so?
—SA

You need to know the process name , go to taskmanager and look for the process name that you want .
replace sublime_text with your process name
VB
Dim pName As String = "sublime_text"
       Dim psList() As Process
       Try
           psList = Process.GetProcesses()

           For Each p As Process In psList
               If (pName = p.ProcessName) Then
                   MsgBox("Process Found")
               End If
           Next p

       Catch ex As Exception
           Console.WriteLine(ex.Message)
       End Try
 
Share this answer
 
Comments
Member 14058217 22-Feb-19 20:06pm    
can it work if added .exe at end of process name?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900