Guest cperago Posted February 22, 2005 Share Posted February 22, 2005 (edited) I am trying to create an autoit script and I am having trouble getting the script to run a two part DOS command. Here is the batch file version of the two commands: c:\BDMP\memberof -q | find /i "[Department-Business Valuation]" if %ERRORLEVEL%*==0* net use U: \\dc2por\Valuations /PERSISTENT:NO How can I use _rundos(...) to include both commands. The first line return the error level and the second line uses the result. If I run two _rundos commands I loose the variable (I think it creates a new dos session for each command) and it does not work. Can I put two command in one _rundos line to maintain the errorlevel and still have the commands run....how? Edited February 22, 2005 by cperago Link to comment Share on other sites More sharing options...
flyingboz Posted February 22, 2005 Share Posted February 22, 2005 (edited) use runwait for each command, it will return the errorlevel, Alternatively, call both commands as one batch file ... lookup @COMSPEC and RunWait() in the help. Edited February 22, 2005 by flyingboz Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. 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