So I made a program to clear my dns cache and renew my ip. When I run the program in debugging mode, it works fine, but when I use the .exe on my desktop, it starts opening a ton of command prompts and opens random windows. Any help would be awesome! 
Source Code:
Code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If CheckBox1.Checked = True Then
Shell("cmd.exe", AppWinStyle.MinimizedFocus)
SendKeys.SendWait("ipconfig /release {ENTER}")
SendKeys.SendWait("ipconfig /flushdns {ENTER}")
SendKeys.SendWait("ipconfig /renew {ENTER}")
SendKeys.SendWait("exit {ENTER}")
Label1.Text = ("STATUS: NEW IP AND DNS CACHE")
Label1.ForeColor = Color.Green
If Label1.Text = "STATUS: NEW IP AND DNS CACHE" Then
Button1.Text = "Done! Exit."
Button4.Show()
Button1.Hide()
End If
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
AboutBox1.Show()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Me.Close()
End Sub
End Class
I tried using SendKeys.Send also, and it did the same thing. I also tried sending all the text in one SendKey function, that also did not work. Same thing all the time!