Вот пример того, как использовать Process.Start со скрытым окном
Dim params As String = "C:\command.bat"
Dim myProcess As New ProcessStartInfo
myProcess.FileName = "cmd.exe"
myProcess.Arguments = params
myProcess.WindowStyle = ProcessWindowStyle.Hidden
Process.Start(myProcess)
если вы столкнулись с проблемой отсутствия файлов с указанием пути, вы можете попытаться добавить следующий вызов Windows API и запустить путь к файлу через эту функцию.
'This would be declared at the top of your Form Code/Class Code
Private Declare Auto Function GetShortPathName Lib "kernel32" ( _
ByVal lpszLongPath As String, _
ByVal lpszShortPath As StringBuilder, _
ByVal cchBuffer As Integer) As Integer
А здесь есть функция для возврата обратно ShortPath (путь в стиле win98 (т.е. c: /progra~1/myfolder/myfile.bat)
Public Function GetShortPath(ByVal longPath As String) As String
Dim requiredSize As Integer = GetShortPathName(longPath, Nothing, 0)
Dim buffer As New StringBuilder(requiredSize)
GetShortPathName(longPath, buffer, buffer.Capacity)
Return buffer.ToString()
End Function
затем просто вызовите свой путь, как этот, в функции process.start
Dim params As String = GetShortPathName("C:\command.bat")