How do I make my Process.Start automatically end after it's done playing?

I'm making my Process.Start play a video within the same file folder however I want it to automatically close on its own after it's done, and not by the user manually clicking exit
I tried doing WaitForExit and Close but it displays: System.NullReferenceException: 'Object reference not set to an instance of an object.'
image.png
Was this page helpful?