How to let windows automatic execute a bat file after startup

Posted on 2005-04-28
Last Modified: 2011-09-20
How to let windows automatic execute a bat file after startup?

Question by:steven98
    LVL 1

    Accepted Solution

    One way is to place the batch file in the startup folder for windows. Which version of windows are you running?

    Another way is to go to the following key in the registry:


    Create a new key there of type String.

    For its data value, type in the full path to the to bat file


    Every time windows loads up, this batch file will run.
    LVL 6

    Expert Comment

    easier would be to put into autostart folder.
    Just open windows explorer (start->run: explorer)
    and copy your batch to the folder autostart
    the location of autostart depends on which windows version you are using: in win9x was in windows\menu
    in win2000 xp it is better you put in default user folder since it wil start for all users, if you want for one user you put it in in the user folder like:
    c:\Documents and Settings\Doctor\Startmenu\Programs\autostart
    so just put the batch in this folder.
    LVL 28

    Expert Comment

    Both methods above require that a user logs on. If this is a problem you can use the Task Scheduleder and tick the "At System Startup" option.
    LVL 9

    Expert Comment

    autostart?  Never saw that in English versions of XP/2k, anyway...might be the case in other languages.

    location here is:

    C:\Documents and Settings\<username>\Start Menu\Programs\Startup

    Also, I believe placing it in "Default User" will only take effect for users created after the changes were made (It's like a template).
    Placing your .bat in "All Users" will take effect for everyone immediately upon next login by anyone.

    C:\Documents and Settings\All Users\Start Menu\Programs\Startup
    LVL 3

    Expert Comment

    A really nice and neat way of doing this is to use: and create a service from your batch file.  This will then execute the batch file whenever you start the machine, even if a user doesn't log in.

    LVL 1

    Expert Comment

    I recommend a split between myself and JamesHarrison.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, ( because one time I did this and I essentially had a bricked …
    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now