Jump to content

Recommended Posts

Posted

I am trying to learn how to create an auto-installation cd and at the 'batch file' stage of the intermediate section this is a sample batch file:

@echo off

title Batch File Testing

echo Hello World

echo.

echo Starting MS Paint

start mspaint

echo.

echo Starting Wordpad

start Wordpad

echo.

pause

exit

The problem is when I run it the two programs just keep opening over and over again and I have to restart the computer because I can't stop them.

Thanks for any advice :)


Posted (edited)

Oh no I'm so silly! Ha and I thought my CPU was going to explode as well :w00t:

I had named it mspaint.cmd and I guess that must've just kept opening it because it was called that. I changed it to TestBatch.cmd and everything is cool.

Thanks very much for your help :)

Edited by goosh
Posted
what is the name of yout CMD file?

Yes! I always avoid naming my CMD/BAT with a name reserved for DOS commands.

Posted

Use proper syntax in your batch file.

If you used

start mspaint.exe

instead of

start mspaint

This could have been avoided.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...