clarkster26 Posted January 4, 2013 Share Posted January 4, 2013 I have read the help file and searched the forums for similar issues but none of them have helped me. The problem I have is when I run this command in blue in a command line it works perfect.msbp.exe backup "db(database=master;backuptype=full;)" "zip64(level=7)" "local(path=\\172.16.1.142\backup2\computerone\master\master.$sJulDate_1.bak.zip)"This is the the only way I could figure out how to get all the "s and spaces in the correct places. I have tried both just the executable msbp.exe and the full path c:\msbp\msbp.exe and it didn't seem to make a difference.Run(@ComSpec & ' /k ,"msbp.exe" ""backup" """db(database=master;backuptype=full;)""" """zip64(level=7)""" """local(path=\\172.16.1.142\backup2\computerone\master\master.$sJulDate_1.bak.zip)""""')After compiling it and running it I get the following:Unknown command: backup "db(database=master;backuptype=full;)" "zip64(level=7)" "local(path=\\172.16.1.142\backup2\computerone\master\master.$sJulDate_1.bak.zip)"Below are the commands for msbp.exe: msbp.exe help msbp.exe backup msbp.exe restore msbp.exe listplugins msbp.exe helpplugin msbp.exe versionFor more information, type msbp.exe help <command>C:\>I don't understand because it seems to output exactly what I need it to and if I copy everything in red and paste it in a command line after the executable name it works perfectly. Sorry I am new to Autoit so forgive me if I left something out. Am I missing something or can someone point me in the right direction? Thanks in advance for your help. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 4, 2013 Developers Share Posted January 4, 2013 try: Run(@ComSpec & ' /k msbp.exe backup "db(database=master;backuptype=full;)" "zip64(level=7)" "local(path=\\172.16.1.142\backup2\computerone\master\master.$sJulDate_1.bak.zip)"') SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
clarkster26 Posted January 4, 2013 Author Share Posted January 4, 2013 That worked. So using a ' instead of " . Is that simply because I am using " in the command? I couldn't find what the /k switch does because I also seen some people using /c instead. Thanks for your help. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 4, 2013 Developers Share Posted January 4, 2013 /K & /C are CMD.exe parameters so are easy to figure out C:\Users\Jos>cmd /? Starts a new instance of the Windows command interpreter CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF] [[/S] [/C | /K] string] /C Carries out the command specified by string and then terminates /K Carries out the command specified by string but remains SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
clarkster26 Posted January 4, 2013 Author Share Posted January 4, 2013 Now when I try to use variables it comes back trying to use the variable name instead of the what the variable is. For example. Run(@ComSpec & ' /k msbp.exe backup "db(database=$CmdLine[1];backuptype=full;)" "zip64(level=7)" "local(path=172.16.1.142backup2computerone$CmdLine[1]$CmdLine[1].$sJulDate_1.bak.zip)"') Is there some other switch I have to use to be able to pass variables in the command? Link to comment Share on other sites More sharing options...
Developers Jos Posted January 4, 2013 Developers Share Posted January 4, 2013 Are you not using SciTE as editor? Anyway, this is the waty to concatenate literal strings with variables: Run(@ComSpec & ' /k msbp.exe backup "db(database=' & $CmdLine[1] & ';backuptype=full;)" "zip64(level=7)" "local(path=\\172.16.1.142\backup2\computerone\' & $CmdLine[1] & '\' & $CmdLine[1] & '.$sJulDate_1.bak.zip)"') Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
clarkster26 Posted January 6, 2013 Author Share Posted January 6, 2013 That worked thanks for all the help. Link to comment Share on other sites More sharing options...
Allex751 Posted January 9, 2013 Share Posted January 9, 2013 Local $var = IniRead(@ScriptDir &"\myfile.ini", "section2", "key", "NotFound") Run(@ScriptDir & "/rtmpdump.exe " &$var) SoundPlay(@WindowsDir & "\media\Speech On.wav",1) parameters: myfile.ini / [section2] key=here parameters 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