peterliong
asked on
How to interpret this program
How do you interpret the program below:
Ipconfig.bat
Line 1: @echo off
Line 2: @start "IPCONFIG /all" /D "%SystemRoot%/system32" /B "%SystemRoot%/system32/Ipc onfig.exe" /all >d:\IP.txt
Line 3: pause
Line 4: exit
Ipconfig.bat
Line 1: @echo off
Line 2: @start "IPCONFIG /all" /D "%SystemRoot%/system32" /B "%SystemRoot%/system32/Ipc
Line 3: pause
Line 4: exit
ASKER
So what is printed in the text file?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
/B says not to open a new window for the program.
You don't need start btw, perhaps just this... leave off the title too if not needed. Don't call it ipconfig.cmd otherwise it will go in infinite loop...
@echo off
Title "Results of IPCONFIG command"
Ipconfig /all >d:\IP.txt
pause
You don't need start btw, perhaps just this... leave off the title too if not needed. Don't call it ipconfig.cmd otherwise it will go in infinite loop...
@echo off
Title "Results of IPCONFIG command"
Ipconfig /all >d:\IP.txt
pause
Do you have any further questions peterliong?
~bp
~bp
Turns off command echoing so you don't see the commands typed, only the results.
@start "IPCONFIG /all" /D "%SystemRoot%/system32" /B "%SystemRoot%/system32/Ipc
start runs a command
The first "IPCONFIG /all" is a title.
/D path
/B command/program
> d:\IP.txt redirects the output to a text file instead of the screen.
pause
Waits for a key
exit
Quits the program
Type the DOS commands in the search box here.
Lee