Quantcast
Viewing all articles
Browse latest Browse all 27041

VS 2012 [RESOLVED] Can't Open Batch File in VS 2012?

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:

Image may be NSFW.
Clik here to view.
Name:  2vwe6iv.png
Views: 55
Size:  104.4 KB
Attached Images
Image may be NSFW.
Clik here to view.
 

Viewing all articles
Browse latest Browse all 27041

Trending Articles



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