Mega Code Archive

 
Categories / VB.Net Tutorial / Development
 

Start process by setting file name

Public Class Tester     Public Shared Sub Main              Dim proc As System.Diagnostics.Process         proc = New System.Diagnostics.Process()         proc.StartInfo.FileName = "c:\\text.txt"         proc.Start()     End Sub End Class Unhandled Exception: System.ComponentModel.Win32Exception: The system cannot find the file specified at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Tester.Main()