I want to run a Python script in cmd when a button is clicked in VB.Net. Do you need to call the Python script in a batch file? Or can you do it directly in VB?
I tried this
Dim ps As New ProcessStartInfo("cmd.exe")
ps.Arguments = "C:\yourbatfile.bat"
Process.Start(ps)
But that only opens the cmd window and doesn't execute the bat file.
/cor/kwhen running cmd), but why open cmd when you can just execute the batch file immediately?Process.Start("C:\yourbatfile.bat")