I'm trying to communicate to CMD through my form but I'm running into a "File Path Not Specified" error even though I've given it full information, or have I? I'll try to provide as much information as possible. If you need anything specific, let me know. So how this works is, you hit button1 and it opens command prompt. Then proceeds to load Label3, label1 then label2's text or maybe this process happens all at once(no clue). They're all suppose to work together to build a sequenced code without the user having to touch any part of this process.
Button1's Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Shell("C:\Windows\System32\cmd.exe /k" + Label3.Text + Label1.Text + Label2.text, AppWinStyle.NormalFocus)
End Sub
Then I made form1 load these set of things upon startup.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label1.Text = "Wow-64.exe"
Label2.Text = "-launcherlogin -noautolaunch64bit -launch -uid wow_enus"
Label3.Text = "cd /d D:\World of Warcraft2"
End Sub
so its loading the text in the labels, on startup, ready to go for the button1's suquence order.
When I click the button I get the file path error as shown here. The file I am trying to mess with is located on my D:\ drive (if this helps, once again no clue). What's weird is, I typed all this code out in CMD and it worked perfectly with no errors but with this, it cannot find the file from what I'm getting. Like I said if I haven't provided enough information just tell me what you need and I'll reply with it.
C:\Windows\System32\cmd.exe /kcd /d D:\World of Warcraft2
(note thekcd
part) – Takarii