Novell Home

Run Multiple DOS Commands without a Batch File

Novell Cool Solutions: Tip
By Greg Walls

Digg This - Slashdot This

Posted: 12 Mar 2004
 

I've discovered a way to run multiple DOS commands without using a batch file.

Create a simple application to run CMD.EXE. On the Parameters line type /C and then your commands separated by the &.

Example

I wanted to display the computer name for users to make remote control easier by displaying the computer name. So I created an application with the following parameters:

Path to executable file:

%*WinSysDir%\cmd.exe

Parameters:

/c echo. & echo. & echo. & echo Your computer name is %computername% & echo. & echo. & echo. & pause

This made it a lot easier to push just the application to other locations and not worry about the batch files or rights to the file.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell