Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

Auto Start: How do I run a program automatically when Windows starts?

Question:

I have a program that I want to auto start every time when windows starts,
how can I do that? I know that i can do it when i put it in start folder in
“programs”. But I don’t want to do it at that way, are there any other methods?
Is it possible to create a batch file or something and write what the program
is named and just click on the batch file one time, and the program will start
every time when the windows starts, or do you have other ideas?

The batch file idea reminds me of the old “autoexec.bat” file that would run
every time MS-DOS was booted. That file still exists for some compatibility
reasons, but it’s no longer used at all.

There are other ways, but things get pretty geeky pretty quick if you don’t
want to use the Start menu functionality.

Become a Patron of Ask Leo! and go ad-free!

I’ll start by saying this: unless you know what you’re doing, the Start menu
– or more correctly the Start->[All] Programs->Startup sub menu – is the
easiest, quickest and safest way to do it. It’s what I honestly recommend –
even if you need to set up an auto-login to make it happen on boot.

All you need do is create a shortcut within that sub menu to whatever it is
you want and it will be run each time you log in.

Now, if you’re still set on finding other ways, my recommendation would be
to grab the tool “autoruns” from
SysInternals.com. It will list everything that auto-starts on your machine, and
from where.

“You probably want to know what you’re doing before you
attempt to add things to the registry

You’ll see several entries that are in the registry, for one example:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

has many programs listed there on my machine. You can easily look at the
examples of what’s already there on your own.

The several different registry keys have different purposes. They run as
different users, and auto-run at different times (Boot versus user login, for
example). They may not have access to everything you need, though, based on
permissions and the state of the machine as it’s booting up.

You probably want to know what you’re doing before you attempt to add things
to the registry. It’s also why I say that the Start menu approach is much
easier.

But the start menu, and the registry, are pretty much your only options.

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

26 comments on “Auto Start: How do I run a program automatically when Windows starts?”

  1. Just for the record (and for users still using Windows 95/98/ME): on 9x-based Windows operating-systems there were also “run=” and “load=” lines in the “win.ini” file, which purpose was to load programs (and drivers, read on); where the run= one was intended to run programs and load= one to load any additional drivers.

    ________

    best regards,
    Ivan Tadej, Slovenija, EU
    http://www.tadej-ivan.be/

    Reply
  2. How about using the Local Computer Policy (if the computer is not a member of a domain) and add a Startup/Logon Script

    Jankovic Milan, Belgrade, Serbia

    Reply
  3. Hi,
    I chanced upon this site as Iw as searching for info on auto start ups. Nice site with lot of information, Thanks.
    I need a little more help. I have tried the start up option. But that does not do waht I need. I have an exe that I would like to run before anything is shown on the desktop to the user. The app should take over the screen before anyone can see anything else about the desktop. I saw your note about downloading autoruns. And I installed it on my machine. Boy, there’s a whole bunch of things that auto start up on my machine. But how do I know the order of these things? If I knew the order, I could probably set my app to be the first to be started. But even then, there might be some windows apps that need to be running before mine can start.
    I am looking at exetoService.com as suggested in a user comment above. I also have a service that this app responds to. Will that in anyway be jeoparadized if I turn this exe into a service?

    Please let me know what my options are at this point.

    Thanks for your help,
    Ramya

    Reply
  4. I used the exetoservice software to convert my app to a service and set it up. I think it works great now and addresses my needs very well. Thanks you for the info on this web site. This was so helpful.
    Ramya

    Reply
  5. HELP!! i need to know how to directly start a program example… When your friend asks a file and you send it by msn i want the program or file to start or open directly after download… Tell me please,,. Thanks

    Reply
  6. —–BEGIN PGP SIGNED MESSAGE—–
    Hash: SHA1

    Starting a program automatically after a download (without
    the recipient explicitly saying “now run this”) would be a
    HUGE security hole and would open up the doors to malware
    even wider than they already are. I’m not aware of a way to
    do that on an IM file transfer, and I wouldn’t recommended
    it if I did.

    Leo

    —–BEGIN PGP SIGNATURE—–
    Version: GnuPG v1.4.7 (MingW32)

    iD8DBQFIe4TyCMEe9B/8oqERAi5NAJ4ld2RnolKqwj0rA5LqMKigjXx6sACeIUUY
    ZoSVixxloiX4lQqZgZiNVg4=
    =5hWJ
    —–END PGP SIGNATURE—–

    Reply
  7. I have question LEo, how to mapping drive auto to user when they login.I use Terminal Service Client that i want they all put they data on server.Example i have folder on D:/Share on server i want when theyuser login,automatically mapping drive z on they computer.Thank

    Reply
  8. Great information. To take this a step further. I have a small freeware executable (Windows) that I want to distribute. I want to include in the install script the ability for the user to either run this program at every boot up and/or at a specified time every day. Is there an easy way to do this?? Thanks

    Reply
  9. I never dare edit registry without guide, but this time Google Web accelerator has stopped running with simple startup folder procedure. I think it is not responding when evoked at an early stage of boot and I need to set up a time, like- ‘200 seconds after boot’ for it to successfully autostart. Even Symbian has a software that can do this but not PC? Is it possible to achieve this by editing the registry? the functions of -atboottime,-osboot,/c,/m etc are not clear to me.

    Reply
  10. what is the command to make batch file auto run every windows start up?

    Create a shortcut to it in Start->Programs->Startup

    – Leo
    01-Jan-2009
    Reply
  11. First off let me just say GREAT site!!
    I’m looking to auto start an older DOS program, but when i put it in startup it does start the program.. BUT minimized on the task bar..
    anyway I can have a program start and start full screen?

    Reply
  12. Hi, I like autorun from SysInternals.

    I use ZoneLabs Security Suite that needs to be started before Outlook — for junk mail filtering. ZoneLabs always start at log in, is there a way to start Outlook after all post login processes start?

    Thanks,
    Mark

    Reply
  13. What if a .exe program requires a “start” button to be pushed, or Alt S. Can this be handled from a autoexec.bat command line?

    Thanks

    Reply
  14. For the novice: Start>All Programs>Startup then Right Click and Open All Users. Copy and paste the shortcut to your program in All Users. Very simple.

    Reply
  15. I dont think Startup style works. Rather replace msmgs.exe(Windows Messenger) with ur app. I am trying to shutdown pc after 5 seconds on startup. Is there any other opt?

    Reply
  16. I NEED a best solution to implements autorun in my c++ Network Monitor software which
    works in any windows platforms.

    Reply will be appreciated…. thnks

    Reply
  17. YOU CAN COPY A SHORTCUT TO THE START UP FOLDER.
    FIRST RIGHT CLICK ON THE APPLICATION .EXE FILE, >>SEND TO >> DESKTOP (BY CREATING SHORTCUT)
    THEN GO TO DESKTOP AND RIGHT CLICK ON THE SHORTCUT >>CUT
    AT-LAST GO TO :C:Documents and SettingsAll UsersStart MenuProgramsStartup
    AND PAST THE SHORTCUT TO THIS FOLDER

    Reply
  18. Interociter Operator, theres a simple way to do that with the startup menu. create a .bat file in the sub menu. put the code “shutdown -s -t 5” in the .bat file and it will shut it down in 5 seconds of startup. hope this helps

    Reply
  19. You can use the msconfig.exe to change a program or service to auto-start or not. Click Run>type “msconfig” and hit enter. The last two tabs are programs and services the auto-start.
    The other way is to use Administrative Tools>Services. You can click on a program or service and see the settings. You can change them to auto or disable. The list shows the cureent state and whethere it is running already. You can start and stop services and find out what other services they rely on. Tread carefully.

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.