Delphi 7: how to execute shell command and check the result?
- by mawg
I'm using Delphi 7 and can't predict the target version of Windows.
I need to create a database (probably MySql, but might be something else) and define some table structures. I do not need to populate any data. Unfortunately, all of the ADO components seem to expect that a database already exists and they will then allow you to manipulate it.
So, since it's only a few simple commands, I thought that I might as well use ShellExectute().
Agree? Disagree?
Can anyone give me a sample code which will attempt to run "MySql --version" and let me check the result? After that I should be able to figure it out for myself. Thanks.