This has been bugging me for 6 hours
How on earth is it solved. I want the program to run a batch file (IP) which is both in resources and in the application path (i.e. bin/debug and /release).
The batch file works when double clicked by itself...
What am I doing wrong? Here is my code. I have tried everything on the internet...
According to the computer, it is opening the right file and it knows its location...
How on earth is it solved. I want the program to run a batch file (IP) which is both in resources and in the application path (i.e. bin/debug and /release).
The batch file works when double clicked by itself...
What am I doing wrong? Here is my code. I have tried everything on the internet...
Code:
Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim OK = MessageBox.Show("Are you sure you want to renew the computer's IP?", "IP Renew?", MessageBoxButtons.OKCancel)
If OK = DialogResult.OK Then
Dim IP As New System.Diagnostics.Process
Dim startinfo As New ProcessStartInfo(AppDomain.CurrentDomain.BaseDirectory & "IP.bat")
startinfo.WindowStyle = ProcessWindowStyle.Hidden
IP.StartInfo = startinfo
IP.Start()
End If
End Sub
According to the computer, it is opening the right file and it knows its location...