Sub createRepo(ByVal sender As Object, ByVal e As System.EventArgs)
Dim repoName As String = repoNameInput.Text
Dim dirExist As Boolean = False
If System.IO.Directory.Exists("C:\svn_repository\" & repoName) Then
dirExist = True
result.Text = "<font color=""red"">Repository Already Exist !</font>"
End If
If (repoName.Length <> 0 And dirExist = False) Then
Dim myProcess As Process = Process.Start("cmd.exe", "/k svnadmin create C:\svn_repository\" & repoName)
myProcess.WaitForExit(10000)
' if the process doesn't complete within
' 10 seconds, kill it
If Not myProcess.HasExited Then
myProcess.Kill()
End If
result.Text = "Respository Created: " _
& myProcess.ExitTime & _
Environment.NewLine & _
"Exit Code (Troubleshooting Purpose): " & _
myProcess.ExitCode
End If
End Sub