Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2012 Can't Open Batch File in VS 2012?

$
0
0
Hey guys. This is something so extremely simple but it's just not working for me. I'm just trying to have my program execute a batch file using process.start(path). However, I'm getting an error "The System Cannot Find the File Specified". The thing is, the file is there and the path is defined correctly. It seems rather unreal that this isn't working. Am I missing something here?

Code:

Imports System.Net.Mail
Imports System.Threading
Imports Microsoft.Win32
Imports System.Environment
Imports System.Net
Imports System.Text
Imports System.Text.RegularExpressions
Imports System.IO

Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

       
        Dim executepath As String = Application.StartupPath + "\getfiles.bat"
        Process.Start(executepath)

    End Sub
End Class

Screenshot Proving the File is in the Startup Path:

Name:  2vwe6iv.png
Views: 10
Size:  104.4 KB
Attached Images
 

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>