creating batch files

by ballistic 5 Replies latest social entertainment

  • ballistic
    ballistic

    Anyone good with batch files under NT 4?

    My win 95 / 98 batch file is similar to this:

    start "C:\Program Files\KaZaA\kazaa.exe"
    start "C:\windows\notepad.exe"
    exit

    and launches about 10 apps before terminating, but it doesn't work under NT. Anyone got any ideas? Or a completely different approach?

    Been searching batch file sites all day literally, and this is far too easy for them.

  • rem
    rem

    I think under NT you use the 'cmd' command instead of 'start'. Do a 'cmd /?' for all of the options.

    rem

  • ballistic
    ballistic

    That sounds like a good one to try thanks.

    I had read something about using that, but I guessed it would open a seperate command prompt window for each time you called it.

    I will try it tomorrow.

  • XandersEvilTwin
    XandersEvilTwin

    Not sure why you are putting anything in front of the file name, though. Those are both .exe files, if you specify them in the command, they'll run themselves.

    Also, it would help if you gave us the exact syntax of the error that occurs with the batch file (or, exactly what happens). Run the file from the command prompt, so the output from it stays visible.

  • ballistic
    ballistic

    Xander, when you just put the program name in like you used to in autoexec.bat, it ties itself up executing the first line and never reaches line 2 of the batch file.

  • Ed
    Ed
    start "C:\Program Files\KaZaA\kazaa.exe"
    start "C:\windows\notepad.exe"
    exit

    Try removing the quotes ( " " ) from around the filename parameter. If an element of the path has a space in it (e.g. Program Files) put quotes around that bit only.

    e.g. -

    start C:\"Program Files"\KaZaA\kazaa.exe
    start C:\windows\notepad.exe
    exit

Share this

Google+
Pinterest
Reddit