Creating and calling processes sequentially is pretty straightforward. You just need to wait for the process to complete before continuing on.
Note: executing a process can be tricky especially if the process generates lots of output as you have to process the output buffer otherwise it'll deadlock. I'm ignoring all that here but to read about this issue go to the docs.
' Warning: My VB is rusty at best
Sub RunPrograms ( programs As String())
For Each program As String in programs
' Use the appropriate Process.Start method for your needs, using the simplest one here
Dim process as Process = Process.Start(program)
' Wait for it to exit, assuming it will not prompt for input or display so much data that the output buffer fills up
process.WaitForExit()
' Optionally check the exit code
If process.ExitCode <> 0 Then
' Something went wrong
End If
Next
End Sub
If you need a Task-based approach then use WaitForExitAsync instead.
Now that you can execute a series of programs in sequential order you just need to add the priority to the list. For this it isn't clear how you modelled that so I'm going to envision that you have a simple type that assigns a priority to a program name.
Public Class PriorityProgram
{
Public Property Priority As Integer
Public Property Program As String
}
Now you can use LINQ to order your programs by priority first or group them.
Sub ExecutePrograms ( programs As List(Of PriorityProgram) )
' Group by priority and then it doesn't matter
Dim orderedPrograms = From program In programs
Group program By program.Priority into gr = Group
Select Priority, Programs = gr
For Each item In orderedPrograms
RunPrograms(item.Programs)
Next
End Sub