Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: autoexec.bat  (Read 5230 times)

0 Members and 1 Guest are viewing this topic.

rockerest

    Topic Starter


    Hopeful
    • Yes
  • Experience: Experienced
  • OS: Windows 7
autoexec.bat
« on: February 22, 2006, 08:04:23 PM »
How do I add a batch file to the autoexec.bat file so that it will run?  Before I edited it, my autoexec file was empty, now the only line is:
Code: [Select]
call start.batIt doesn't work.  There is a .bat file in the same folder (C:\) named start.bat, but nothing happened.  The start.bat file is a very simple batch file I've written myself, consisting of a simple reminder to myself (more a test than anything) and contains these lines:
Code: [Select]
@echo off
echo Windows is Starting
ping -n 1 -w 2000 1.1>nul
echo Remember to change the outgoing server in Thunderbird to the correct outgoing mail POP server
ping -n 1 -w 2000 1.1>nul
cls
echo Windows is Starting
ping -n 1 -w 2000 1.1>nul
cls
echo Windows is Starting .
ping -n 1 -w 2000 1.1>nul
cls
echo Windows is Starting ..
ping -n 1 -w 2000 1.1>nul
cls
echo Windows is Starting ...
ping -n 1 -w 2000 1.1>nul
pause

Is there a setting I need to set in order for autoexec.bat to automatially run whenever the computer boots?

thanks, rock


edit #1:
Sorry:
I'm running Windows XP SP2, I think that's all the pertinent info.....
« Last Edit: February 22, 2006, 08:13:58 PM by rockerest »
In general, the PEBKAC.  Whether it's now or was three weeks ago, the PEBKAC.
Unsafe browsing and general computer / internet illiteracy IS the users problem.  Don't have sex if you don't know how to use a condom.
Also, there are 10 types of people in the world, those who understand binary, and those who don't.

Dusty



    Egghead

  • I could if she would, but she won't so I don't.
  • Thanked: 75
  • Experience: Beginner
  • OS: Windows XP
Re: autoexec.bat
« Reply #1 on: February 23, 2006, 12:35:51 AM »
I understand that Autoexec.bat is not used when XP boots only when you run cmd or command.  You could try adding your .bat file in the Startup.

One good deed is worth more than a year of good intentions.

Backdated

  • Guest
Re: autoexec.bat
« Reply #2 on: February 23, 2006, 02:48:01 PM »
Try running it from c:\windows\autoexec.nt

rockerest

    Topic Starter


    Hopeful
    • Yes
  • Experience: Experienced
  • OS: Windows 7
Re: autoexec.bat
« Reply #3 on: February 24, 2006, 01:20:07 AM »
I assume you mean c:\windows\system32\autoexec.nt since c:\windows\autoexec.nt doesn't exist.
I added these two lines to autoexec.nt
Code: [Select]
REM start boot.bat
call %SystemRoot%\boot.bat
But it didn't work.
I have moved the boot.bat file to C:\Windows, since that's where %SystemRoot% points...

Thanks for the idea, any more?

-rock
In general, the PEBKAC.  Whether it's now or was three weeks ago, the PEBKAC.
Unsafe browsing and general computer / internet illiteracy IS the users problem.  Don't have sex if you don't know how to use a condom.
Also, there are 10 types of people in the world, those who understand binary, and those who don't.

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: autoexec.bat
« Reply #4 on: February 24, 2006, 05:31:34 AM »
Autoexec.nt is used to initialize the MS-DOS Prompt environment (command.com). Windows initializes the Command Prompt environment (cmd.exe). If you want a file to start with Windows, create a shortcut to the file in the startup folder (Start-->All Programs-->Startup)

As mentioned, autoexec.bat is not used on NT machines (includes Win2000 & WinXP)

Good luck.  8-)

« Last Edit: February 24, 2006, 05:35:23 AM by Sidewinder »
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein