If you need to start a Process but need only a single instance of it to run you can check if
the process is running then decide where to run yours or not
If proc.ProcessName.StartsWith("aprogram.exe") = False Then
Try
proc.StartInfo.WorkingDirectory = "C:\Program Files\program \aprogram"
roc.StartInfo.FileName = "C:\Program Files\program\aprogram\aprogram.exe "
proc.StartInfo.Arguments = filename & ".CSV"
proc.Start()
Catch ex As Exception
msgbox(ex.message)
End Try
End If
If you are using visual studio and your application is not a console application then
you could set it as a single instance application.
No comments:
Post a Comment