By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,591 Members | 629 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,591 IT Pros & Developers. It's quick & easy.

Getting a .bat file location in the application location and executing it

P: 2
Im trying to make my application check for any .bat files In its location
im using

Dim directory As String = My.Application.Info.DirectoryPath

to the my application directory
and im using This

Dim di As New IO.DirectoryInfo(directory)
Dim diar1 As IO.FileInfo() = di.GetFiles("*.bat")
Dim dra As IO.FileInfo

To Check For a .bat file in the application location

But now how do i get it to run the .bat file if there is only one of its kind?
Mar 16 '14 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 9,731
Use the Shell Function to execute the .bat files.

Mar 18 '14 #2

Post your reply

Sign in to post your reply or Sign up for a free account.