How to detect mysql
Somebody can show me how to detect my sql in OS!!!
Before I set up my application,I must check my sql is installed or not. I has already looked forward to find on Wiki. No help for me!
Thank alot for your help,
:)
Archive: How to detect mysql
How to detect mysql
Somebody can show me how to detect my sql in OS!!!
Before I set up my application,I must check my sql is installed or not. I has already looked forward to find on Wiki. No help for me!
Thank alot for your help,
:)
I am looking at the MySQL msi install file and it looks like it is storing information in HKLM\Software\MySQL AB\MySQL Server x.x.
Look for registry values Location (default is $PROGRAMFILES\MySQL\MySQL Server x.x\) and Version (formated as x.x.xx).
For example version 5.0.26 generates the following entries:
HKLM "Software\\MySQL AB\\MySQL Server 5.0" "Location"
>HKLM "Software\\MySQL AB\\MySQL Server 5.0" "Version"
CF
Now I can detect MySQL but I do not know why MessageBox display when I set up my SQL
My code is here:
Section "Check_MySQL"
Call DetectMySQL
SectionEnd
Function DetectMySQL
ClearErrors
ReadRegStr $1 HKLM "Software\MySQL AB\MySQL Server 5.0" "Location"
ReadRegStr $2 HKLM "Software\MySQL AB\MySQL Server 5.0" "Version"
IfErrors 0 NoAbort
MessageBox MB_OK "Couldn't find a MySQL installed.Program will set up MySQL 5.0 now!"
SetOutPath $PLUGINSDIR
File "E:\Server\Script\Enviroment\MySQL\MySQL_5_0.exe"
nsExec::ExecToStack '"$INSTDIR\MySQL_5_0.exe" /s'
Delete "$INSTDIR\MySQL_5_0.exe"
MessageBox MB_OK "My SQL is installed"
NoAbort:
MessageBox MB_OK "Find a MySQL installed. Set up will return the process now."
FunctionEnd
Everything is OK only one line
"MessageBox MB_OK "My SQL is installed" " is not
Before I install MySQL, this announcement appear. I want it to appear the end of the process installing MySQL
Someone can help me!!!!
Thank in advance,
Apologies for replying to self, but I still have one more question. How can we run file sql on batch mode?
I also read about ExecDos and ExecCmd. But i am worry about the user and pass which I must use to access MySQL.
Thank you for your help,