Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How to make a piece of coding run on startup?

I have written a clever piece of coding on windows small basic but i want to know how can i make this code run on start up. Anyone know how?

5 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    There are several ways, please ignore people telling you to use autoexec.bat, as they are clearly living in the past. Vista does not even support the autoexec.bat file anymore, so I'm assuming Windows 7 does not either. Best to avoid falling into a bad habit now, rather than find out it will not work later when you rely on it.

    You can either as someone said, drop in the startup folder, or you can create a new registry key in some places in "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\" depending on if you only want it to be run once on startup, then stop on subsequent startups, or if you want it to startup everytime.

  • Anonymous
    1 decade ago

    You'll need to open the Dos emulator.

    From Start menu select "Run".

    Enter "cmd" and select run

    This opens a window with something that looks like DOS. You should be in the Root directory, it'll have something like c:/ as a prompt.

    Save your creation with the filename "autoexec.exe".

    This may not work with that filename extension because it depends on what other files are around which affect the way that Windows boots but it's worth a try.

  • Anonymous
    1 decade ago

    make a batch file with the location of the file and place it in your startup folder.

    you basically just put the location of the file in a txt document.

    c:\blah\blah\file-i-wan-to-start.extension

    save it as a .bat file instead of .txt

    Voila

    Source(s): my brain
  • 1 decade ago

    yes, you should make a batch file and place it in the Startup folder ...

  • How do you think about the answers? You can sign in to vote the answer.
  • 1 decade ago

    yes..just paste that file inside:

    C:\Documents and Settings\All Users.WINDOWS\Start Menu\Programs\Startup

    replace that All users with your user name if it does not work

Still have questions? Get your answers by asking now.