Command Prompt - how to "cd\"

Graham Dyer

New member
Joined
May 8, 2009
Messages
2
Programming Experience
Beginner
In a command prompt which I've opened, I want to change the directory to the root ie the dos command "cd\"

my code is:
VB.NET:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Process.Start("cmd.exe").PriorityClass = ProcessPriorityClass.Normal
        SendKeys.SendWait("cd\")
        System.Threading.Thread.Sleep(1000)
        SendKeys.SendWait("{enter}")
    End Sub

But it will not change, the {enter} works but not the "cd\", how can I do this simply?
 
Back
Top