lsakizada Posted August 2, 2007 Posted August 2, 2007 Hi, I have this problem: - I need to run a the windows command line cmd.exe. - from this command to run batch file called qatools.bat - I need to redirect the log console input to file named test.txt. - when the batch run I need to send some parameters to the batch and make sure the file is populated with data So, i wrote something like that: RunWait(@ComSpec & ' /c cd C:\BSCSimulators' & _ '& qatools.bat > c:\test.log' & _ '& 1' & _ '& 23' & _ '& 1' & _ '& +2', '', @SW_HIDE) my problem is that the optional parameters (1, 23,1 and +2) are not executing well. What am I should do? Be Green Now or Never (BGNN)!
MHz Posted August 2, 2007 Posted August 2, 2007 my problem is that the optional parameters (1, 23,1 and +2) are not executing well. What am I should do?Looks like "command & command & command & command" to me rather then optional parameters. This removes the 1st command of CD, but you still may need to fix the rest. RunWait(@ComSpec & ' /c ' & _ 'qatools.bat > c:\test.log' & _ '& 1' & _ '& 23' & _ '& 1' & _ '& +2', 'C:\BSCSimulators', @SW_HIDE)
lsakizada Posted August 2, 2007 Author Posted August 2, 2007 Looks like "command & command & command & command" to me rather then optional parameters. This removes the 1st command of CD, but you still may need to fix the rest. RunWait(@ComSpec & ' /c ' & _ 'qatools.bat > c:\test.log' & _ '& 1' & _ '& 23' & _ '& 1' & _ '& +2', 'C:\BSCSimulators', @SW_HIDE) What do you mean ""command & command & command & command" ? This parameters are simmilar to key stroke send(1{Enter})...because it response to menue options. How do I do those commands Be Green Now or Never (BGNN)!
MHz Posted August 2, 2007 Posted August 2, 2007 What do you mean ""command & command & command & command" ? This parameters are simmilar to key stroke send(1{Enter})...because it response to menue options.You are telling the wrong interpreter with this information. CMD does not know the commands that you are passing. Character: & [...]Syntax: command1 & command2Definition: Use to separate multiple commands on one command line. Cmd.exe runs the first command, and then the second command.How do I do those commandsNot enough information for me to understand what you are trying to do.
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