Jump to content

_RunDOS multiple lines


Recommended Posts

i dont quite understand you but if you want to send 2 commands then:

#include <process.au3>
_RunDOS('ipconfigl')
sleep(200)
_RunDOS('ipconfig /all')
exitoÝ÷ ÛöÛºÛaÌ"W(ë©Â+aax"*.Á©í¶¶Ø^­ë.Ú¶,&©Ý³*.ë-ºÇØ^­+]¢ëe¢¶¥¥ø¥zåG­«[jëh×6Run(@ComSpec & " /C ipconfig /all > "&@tempdir &'\tempipconfig.txt', "", @SW_HIDE)
$read = FileRead(@tempdir &'\tempipconfig.txt')
msgbox(0, "", $read)
exit

then play with strings to get the results you want

Link to comment
Share on other sites

Multiple commands inline.

RunWait('"' & @ComSpec & '" /c ipconfig & ipconfig /all & pause')

Character: &

Syntax: command1 & command2

Definition: Use to separate multiple commands on one command line. Cmd.exe runs the first command, and then the second command.

Character: &&

Syntax: command1 && command2

Definition: Use to run the command following && only if the command preceding the symbol is successful. Cmd.exe runs the first command, and then runs the second command only if the first command completed successfully.

Character: ||

Syntax: command1 || command2

Definition: Use to run the command following || only if the command preceding || fails. Cmd.exe runs the first command, and then runs the second command only if the first command did not complete successfully (receives an error code greater than zero).

Character: ( )

Syntax: (command1 & command2)

Definition: Use to group or nest multiple commands.

:)
Link to comment
Share on other sites

im not sure if any of these are the right answer but i didnt explain that well waht i ment was it to type something like ...doesnt have to be but just for the sake of it i want to type ipconfig then a short pause then ipconfig/all. i dont want to run them at 2 separate times.

so it would basiclly be like opening a cmd prompt and typing

ipconfig then hit enter

then type ipconfig/all then hit enter again

its in the same window but at diff times

so is it like _rundos(ipconfig & ipconfig/all)

or

so is it like _rundos(ipconfig)

_rundos(ipconfig/all)

... i dont think im making any sense...

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...