[RESOLVED] A bug in console apps?
I have the following code:
Code:
Private Sub startMySQLConsole()
Dim parameterString As String
parameterString = ""
For i = 1 To (My.Application.CommandLineArgs.Count - 1) 'First parameter is used elsewhere.
parameterString = parameterString & " " & My.Application.CommandLineArgs.Item(i)
Next
If My.Computer.FileSystem.FileExists(currentPath & "/apps/bats/mysql.bat") Then
Shell(currentPath & "/apps/bats/mysql.bat " & parameterString)
Else
Console.WriteLine(currentPath & "/apps/bats/mysql.bat")
Console.WriteLine("Doesn't exist.")
End If
End Sub
It basically starts a batch file I have created and passes parameters to it.
In the batch file:
Code:
B:/WAMP/apps/mysql/mysql5.1.33/bin/mysql %1 %2 %3 %4 %5 %6 %7 %8 %9
When this is executed, something very strange happens. Here is the console output:
Code:
b:\WAMP>pwamp.exe -mysql -u root -p
b:\WAMP>B:/WAMP/apps/mysql/mysql5.1.33/bin/mysql -u root -p
Enter password:
b:\WAMP>*oor
'oor' is not recognized as an internal or external command,
operable program or batch file.
b:\WAMP>*omething strange
'omething' is not recognized as an internal or external command,
operable program or batch file.
b:\WAMP>
For some reason, it partially exists the program. The first letter of the line is starred (MySQL wants me to enter a password).
Any ideas on how to fix this?
I want to use get to mysql via the my app, which launches mysql.
Re: A bug in console apps?
Created a workaround any way. I now use the START command in the batch file to start an external CLI.