Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: how to attach my bat file to autoexec.bat  (Read 12903 times)

0 Members and 1 Guest are viewing this topic.

#groff -Tascii -man yakub

  • Guest
how to attach my bat file to autoexec.bat
« 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
« Last Edit: July 11, 2008, 07:31:52 AM by #groff -Tascii -man yakub »

Dias de verano

  • Guest
Re: how to attach my bat file to autoexec.bat
« Reply #1 on: July 11, 2008, 11:21:48 AM »
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"



#groff -Tascii -man yakub

  • Guest
Re: how to attach my bat file to autoexec.bat
« Reply #2 on: July 11, 2008, 12:31:09 PM »
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

Dias de verano

  • Guest
Re: how to attach my bat file to autoexec.bat
« Reply #3 on: July 11, 2008, 12:46:17 PM »
if autoexec.bat is hidden

attrib -h autoexec.bat

Are you sure it contains any lines?

#groff -Tascii -man yakub

  • Guest
Re: how to attach my bat file to autoexec.bat
« Reply #4 on: July 11, 2008, 01:00:41 PM »
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

Dias de verano

  • Guest
Re: how to attach my bat file to autoexec.bat
« Reply #5 on: July 11, 2008, 01:16:19 PM »
It does not contain any lines, it is empty? What OS are you running?

Dusty



    Egghead

  • I could if she would, but she won't so I don't.
  • Thanked: 75
  • Experience: Beginner
  • OS: Windows XP
Re: how to attach my bat file to autoexec.bat
« Reply #6 on: July 11, 2008, 08:06:14 PM »
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.
Quote
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.

One good deed is worth more than a year of good intentions.

#groff -Tascii -man yakub

  • Guest
Re: how to attach my bat file to autoexec.bat
« Reply #7 on: July 11, 2008, 11:03:45 PM »
but how to attach a file in the satrup using dos command

Deerpark



    Egghead
  • Thanked: 1
    Re: how to attach my bat file to autoexec.bat
    « Reply #8 on: July 12, 2008, 06:50:34 AM »
    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?
    Any sufficiently advanced technology is indistinguishable from magic.
    Arthur C. Clarke (1917 - 2008)

    #groff -Tascii -man yakub

    • Guest
    Re: how to attach my bat file to autoexec.bat
    « Reply #9 on: July 12, 2008, 07:27:39 AM »
    i am using xp service pack 2

    Deerpark



      Egghead
    • Thanked: 1
      Re: how to attach my bat file to autoexec.bat
      « Reply #10 on: July 12, 2008, 07:29:57 AM »
      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
      Any sufficiently advanced technology is indistinguishable from magic.
      Arthur C. Clarke (1917 - 2008)

      Dias de verano

      • Guest
      Re: how to attach my bat file to autoexec.bat
      « Reply #11 on: July 12, 2008, 07:39:03 AM »
      I generally feel a teeny bit suspicious when the question, "how can I make a program startup by means of a script?" comes up. 

      #groff -Tascii -man yakub

      • Guest
      Re: how to attach my bat file to autoexec.bat
      « Reply #12 on: July 12, 2008, 08:43:33 AM »
      thanks to all for you replays