How to Auto-run a batch file

user3163398 picture user3163398 · Jan 5, 2014 · Viewed 10.4k times · Source

How do i auto-run a .bat (batch) file? Meaning, I have a .bat file which registers me for few things and there are a few errors in the batch file which is fine. I just go on clicking 'ok' a few times to ignore these error messages, which seems monotonous. Kindly help me to solve this issue!

Answer

Aaron Brager picture Aaron Brager · Jan 5, 2014

You can call it from your autoexec.bat file and it will run automatically. For example, if your file is commands.bat:

@ECHO OFF
PROMPT $P$G
PATH C:\DOS;C:\WINDOWS
SET TEMP=C:\TEMP
SET BLASTER=A220 I7 D1 T2
LH SMARTDRV.EXE
LH DOSKEY
LH MOUSE.COM /Y
C:\COMMANDS.BAT
WIN