Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Windows Startup

Windows Startup

Scheduled Pinned Locked Moved C / C++ / MFC
windows-adminquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    extus
    wrote on last edited by
    #1

    Hi! Does anyone know how can i make my application starts when windows starts up, i mean using code not put the application in the startup folder!:). I think i must use the registry but i m not sure! Thanks! ------------------------------ If you can't find the -- -- -- -- -- -- -- -- -- -- way..let the way find you.. ------------------------------

    L F T 3 Replies Last reply
    0
    • E extus

      Hi! Does anyone know how can i make my application starts when windows starts up, i mean using code not put the application in the startup folder!:). I think i must use the registry but i m not sure! Thanks! ------------------------------ If you can't find the -- -- -- -- -- -- -- -- -- -- way..let the way find you.. ------------------------------

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      extus wrote:

      Hi! Does anyone know how can i make my application starts when windows starts up, i mean using code not put the application in the startup folder!. I think i must use the registry but i m not sure! Thanks!

      Try this :

      CRegKey key;
      LONG status = key.Open(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run");

      if(status==ERROR_SUCCESS)
      {
      key.SetValue("Path of your program","Name of your program");
      }

      key.Close();

      do not forget to include atlbase.h in your application


      "Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
      -- modified at 7:26 Saturday 15th October, 2005

      1 Reply Last reply
      0
      • E extus

        Hi! Does anyone know how can i make my application starts when windows starts up, i mean using code not put the application in the startup folder!:). I think i must use the registry but i m not sure! Thanks! ------------------------------ If you can't find the -- -- -- -- -- -- -- -- -- -- way..let the way find you.. ------------------------------

        F Offline
        F Offline
        Fired Fish
        wrote on last edited by
        #3

        sure ,you must set Registry let your application start up after windows starts up and use API function. ---------------------------- Jerry yu Chinese programming fans

        1 Reply Last reply
        0
        • E extus

          Hi! Does anyone know how can i make my application starts when windows starts up, i mean using code not put the application in the startup folder!:). I think i must use the registry but i m not sure! Thanks! ------------------------------ If you can't find the -- -- -- -- -- -- -- -- -- -- way..let the way find you.. ------------------------------

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          extus wrote:

          i! Does anyone know how can i make my application starts when windows starts up, i mean using code not put the application in the startup folder!. I think i must use the registry but i m not sure! Thanks!

          extus wrote:

          i! Does anyone know how can i make my application starts when windows starts up, i mean using code not put the application in the startup folder!. I think i must use the registry but i m not sure! Thanks!

          In continuation With Giorgi:- there are two more place from where you can start your application at window startup:- #1 already told bu Giorgi #2 HKEY_CURRENT_USER code:- (just One change to Giorgi code)

          CRegKey key;
          LONG status = key.Open(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Run");

          if(status==ERROR_SUCCESS)
          {
          key.SetValue("Path of your program","Name of your program");
          }

          key.Close();

          #3 Make entry in %windir%\startup

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta VC Forum Q&A :- I/ IV

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups