Computer Hope
Microsoft => Microsoft Windows => Windows NT/2000 => Topic started by: rockerest 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:
call start.bat
It 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:
@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.....
-
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.
-
Try running it from c:\windows\autoexec.nt
-
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
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
-
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-)