kmetski Posted February 25, 2009 Share Posted February 25, 2009 (edited) #include<process.au3> Dim $sdir = '' & @ScriptDir & '\' dim $systemdrive = '' & @HomeDrive & '\' Run("netsh firewall set portopening protocol=TCP port=3306 name=MYSQL_TCP_3306 mode=ENABLE profile=All","",@SW_HIDE) $var1 = MsgBox(33,"WARNING", "DELETE \Program Files\MySQL\") if $var1=1 Then DirRemove(@ProgramFilesDir&"\MySQL", 1) EndIf FileCopy($sdir&"MySQL\temp-my.ini",$systemdrive,1) RunWait(@ComSpec & " /c " & "start /wait "&$sdir&"MySQL\MySQL_Server.msi"&" /q",$sdir,@SW_HIDE) $mysqlset = '"'&@ProgramFilesDir &'\MySQL\MySQL Server 5.0\bin\MySQLInstanceConfig.exe'&'"'&" -i -q "& '"'&'-l'&$systemdrive&'mysql_install_log.txt'&'"'&' "'&'-nMySQL'&'" '&'"'&'-p'&@ProgramFilesDir&'\MySQL\MySQL Server 5.0'&'" '& '-v5.0.13 '& '"'&'-t'&$systemdrive&'temp-my.ini'&'" '&'"'&'-c'&@ProgramFilesDir&'\MySQL\MySQL Server 5.0\my.ini'&'" '&'ServerType=SERVER DatabaseType=INNODB ConnectionUsage=DSS Port=3306 ServiceName=MySQL RootPassword=123456 AddBinToPath=yes Charset=utf8 RootCurrentPassword=123456 SkipNetworking=no' _RunDOS($mysqlset) When i run ConsoleWhrite($mysqlset) every thing is fine, when i copy it from console go to windows cmd paste enter it works perfect. Any ideas Edited February 27, 2009 by kmetski Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 25, 2009 Share Posted February 25, 2009 ...every thing is fine, ...it works perfect. Any ideasLeave well-enough alone? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
martin Posted February 25, 2009 Share Posted February 25, 2009 #include<process.au3> Dim $sdir = '' & @ScriptDir & '\' dim $systemdrive = '' & @HomeDrive & '\' Run("netsh firewall set portopening protocol=TCP port=3306 name=MYSQL_TCP_3306 mode=ENABLE profile=All","",@SW_HIDE) $var1 = MsgBox(33,"WARNING", "DELETE \Program Files\MySQL\") if $var1=1 Then DirRemove(@ProgramFilesDir&"\MySQL", 1) EndIf FileCopy($sdir&"MySQL\temp-my.ini",$systemdrive,1) RunWait(@ComSpec & " /c " & "start /wait "&$sdir&"MySQL\MySQL_Server.msi"&" /q",$sdir,@SW_HIDE) $mysqlset = '"'&@ProgramFilesDir &'\MySQL\MySQL Server 5.0\bin\MySQLInstanceConfig.exe'&'"'&" -i -q "& '"'&'-l'&$systemdrive&'mysql_install_log.txt'&'"'&' "'&'-nMySQL'&'" '&'"'&'-p'&@ProgramFilesDir&'\MySQL\MySQL Server 5.0'&'" '& '-v5.0.13 '& '"'&'-t'&$systemdrive&'temp-my.ini'&'" '&'"'&'-c'&@ProgramFilesDir&'\MySQL\MySQL Server 5.0\my.ini'&'" '&'ServerType=SERVER DatabaseType=INNODB ConnectionUsage=DSS Port=3306 ServiceName=MySQL RootPassword=123456 AddBinToPath=yes Charset=utf8 RootCurrentPassword=123456 SkipNetworking=no' _RunDOS($mysqlset) When i run ConsoleWhrite($mysqlset) every thing is fine, when i copy it from console go to windows cmd paste enter it works perfect. Any ideas Assuming I understand then I suspect PsaltyDS didn't Is it because in your script you are first removing the folder that you then want to use in your command? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 25, 2009 Share Posted February 25, 2009 Assuming I understand then I suspect PsaltyDS didn't PsaltyDS is getting grouchy in his old age, and was annoyed there was no problem description whatsoever. To the contrary, the post only listed conditions where everything worked. Is it because in your script you are first removing the folder that you then want to use in your command?That can be avoided by not clicking OK on the MsgBox(), but still might be it! Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
kmetski Posted February 26, 2009 Author Share Posted February 26, 2009 (edited) Assuming I understand then I suspect PsaltyDS didn't Is it because in your script you are first removing the folder that you then want to use in your command?Hi martin im removing the folder in C:\program files\MySql\Just in case to remove some old serversettings.After that i install MYSQL 5.0 and the folder i created.after that i run the config for the mysql server i couldn`t manage to make it work whit _RUNDOSBut i managed to make it work with RUN10x Anywaysomebody to change the topic to SLOVED Edited February 26, 2009 by kmetski Link to comment Share on other sites More sharing options...
Inverted Posted February 26, 2009 Share Posted February 26, 2009 You can edit your first post and change the subject ... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now