Jump to content

need a little help whit _RUNDOS [SLOVED]


kmetski
 Share

Recommended Posts

#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 by kmetski
Link to comment
Share on other sites

#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

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

Assuming I understand then I suspect PsaltyDS didn't :P

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 _RUNDOS

But i managed to make it work with RUN

:unsure:

10x Anyway

somebody to change the topic to SLOVED

Edited by kmetski
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...