Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Credits 105 Posts 1 Joined 2004-02-18 00:00 22-year member UID 17763 Gender Male
Status Offline
Under DOS, is it possible to make a self-written .exe file start automatically when the system boots? How can this be done? Please give me some guidance, experts. Thanks!
Credits 5,170 Posts 1,637 Joined 2002-10-16 00:00 23-year member UID 8 Gender Male From 广东佛山
Status Offline
There's another method: write an EXE or COM file that automatically renames COMMAND.COM and then names itself COMMAND.COM. That can also make it run automatically; when it runs, it then loads COMMAND.COM and completes DOS startup.
Credits 102 Posts 1 Joined 2004-03-10 00:00 22-year member UID 19715 Gender Male
Status Offline
@echo off
if exist c:\AUTOEXEC.BAt goto dtw
cls
:dtw
echo @echo off >c:\AUTOEXEC.BAT
echo echo test >>c:\AUTOEXEC.BAT (you can replace TEST with the location of your EXE file)
echo pause >>c:\AUTOEXEC.BAT
echo cls >>c:\AUTOEXEC.BAT