1.

Solve : Batch file erase, don't have a clue?

Answer»

On my wife's computer (DELL Latitude) running Windows XP SP2, when I make an autoexec.bat file and place in the root directory after rebooting, the file has been erased. I have gone through this procedure several times and it always gets erased after booting. This is a really simple .bat file that only sets the path. Any ideas?
Please help,
DougOn an XP machine, the autoexec.bat file has been replaced by the autoexec.nt file which should be in the system32 directory. The autoexec.nt file is used to initialize the Windows DOS environment not Windows.

Not to be obvious, but are you saving the file correctly?

Have you checked what, if any, jobs are running from the startup folder? Many other jobs are started from the registry. The msconfig utility can help you see them. Perhaps one of them is the culprit.

If you still have problems, it might be wise to trot over to the Viruses and Spyware board and let the experts check it out.

Good luck. Bewareofdoug - Welcome to the CH forums.

Autoexec.bat is parsed when windows is loaded but the only statements which are executed are SET and Path, all OTHERS are ignored.

The following quote is from this wiki:
Quote

The AUTOEXEC.BAT file may often be found on Windows NT, in the root directory of the boot drive. Windows only considers the "SET" and "PATH" statements which it contains, in order to define environment variables global to all users.

And another from this site:
Quote
Windows XP searches the startup files and processes the environment variable settings in the following order:

* Autoexec.bat files
* System Variables
* User Variables

Here's a long odds reason why you "lose" the file -- if you are using Notepad to create the file, Notepad will append the suffix .TXT to the file when it is SAVED therefore Autoexec.bat will not be found. When saving with Notepad enclose the the filename/suffix to save in " ' e.g. "autoexec.bat"

Good luckThanks for the tips.

I am editing the file from the dos prompt edit command.
I have already created the autoexec.bat.txt file using notepad so that I can just delete the .txt part and run the .bat from prompt.

Thanks for the tip about the .nt file. I don't know MUCH about the windows enviroment, just an old dos guy that does a lot of stuff in Dbase.

The funny THING is that I use an autoexec.bat file on a different computer and don't have the erase problem.

Thanks again,
Doug


Discussion

No Comment Found