Delphi 7: how to execute shell command and check the result?
Posted
by mawg
on Stack Overflow
See other posts from Stack Overflow
or by mawg
Published on 2010-05-25T03:42:36Z
Indexed on
2010/05/25
3:51 UTC
Read the original article
Hit count: 390
delphi
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.
© Stack Overflow or respective owner