Computer Hope
Microsoft => Microsoft DOS => Topic started by: #groff -Tascii -man yakub on July 11, 2008, 07:20:28 AM
-
Can any body tell me how to attach my batch file to the autoexec.bat file which will execute my file automatically at the boot time
-
Method 1.
type autoexec.bat > autoexec.new
type yourfile.bat >> autoexec.new
ren autoexec.bat autoexec.old
ren autoexec.new autoexec.bat
Method 2.
add this line to the end of autoexec.bat using EDIT
yourfile.bat
In the above examples, yourfile.bat means "the name of your batch file"
-
but wehen i want to edit the autoexec.bat file it is giving a blank screen inthe dos editor
how to unhide &edit the autoexec.bat file
-
if autoexec.bat is hidden
attrib -h autoexec.bat
Are you sure it contains any lines?
-
i does not contain any lines
if i use the comman "attrib -h autoexec.bat"
it is giving an errorwith the message
not resetting system file autoexec.bat
-
It does not contain any lines, it is empty? What OS are you running?
-
It does not contain any lines, it is empty? What OS are you running?
Sounds very much like XP in which case Autoexec.bat is irrelevant except for SET commands. The .bat file, or a shortcut to it, could be put in the Startup programs file so that it runs when Windows is loaded.
Here is a quote from this Wiki. (http://en.wikipedia.org/wiki/AUTOEXEC.BAT) Windows NT and its descendants Windows XP and Windows Vista parse AUTOEXEC.BAT when a user logs on. As with Windows Me, anything other than setting environment variables is ignored.
-
but how to attach a file in the satrup using dos command
-
You need to answer this question #groff -Tascii -man yakub.
What OS are you running?
OS = Operating System AKA what version of Windows are you using?
-
i am using xp service pack 2
-
As Dusty said, the easiest way to make it start with Windows is to add it to the startup folder.
C:\Documents and Settings\[YOURUSERNAME]\Start Menu\Programs\Startup
-
I generally feel a teeny bit suspicious when the question, "how can I make a program startup by means of a script?" comes up.
-
thanks to all for you replays