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#
  4. How can i load a program autimatically when windows loaded

How can i load a program autimatically when windows loaded

Scheduled Pinned Locked Moved C#
questioncsharp
9 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.
  • H Offline
    H Offline
    Hesham Yassin
    wrote on last edited by
    #1

    i programmed a program and i want it to be loaded autimatically when windows load. how can i do it in C# ?

    J D 2 Replies Last reply
    0
    • H Hesham Yassin

      i programmed a program and i want it to be loaded autimatically when windows load. how can i do it in C# ?

      J Offline
      J Offline
      J 0
      wrote on last edited by
      #2

      Place a shortcut to your .exe in the Startup folder. You can find your start up folder here: Start menu -> All Programs -> Startup Not a C# answer, but will get you what you want.

      1 Reply Last reply
      0
      • H Hesham Yassin

        i programmed a program and i want it to be loaded autimatically when windows load. how can i do it in C# ?

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        This has nothing to do with C#. There are two Startups. When Windows load, you would have to write your app as a windows service. Or, when the user logs in, you can put a shortcut in either of the Startup folders, or the command line in the Run key in the registry.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        H 1 Reply Last reply
        0
        • D Dave Kreskowiak

          This has nothing to do with C#. There are two Startups. When Windows load, you would have to write your app as a windows service. Or, when the user logs in, you can put a shortcut in either of the Startup folders, or the command line in the Run key in the registry.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          H Offline
          H Offline
          Hesham Yassin
          wrote on last edited by
          #4

          I tried what u said and i got that the directory of the StartUp folder exist in Application.StartUp; String dir = Application.StartUp; but how can i store the shortcut of the program or how i build an *.job file?

          D 1 Reply Last reply
          0
          • H Hesham Yassin

            I tried what u said and i got that the directory of the StartUp folder exist in Application.StartUp; String dir = Application.StartUp; but how can i store the shortcut of the program or how i build an *.job file?

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            I've never heard of a "job" file. Nothing in Windows ever uses one. To create a shortcut is very easy. click and hold the mouse of your .EXE file and drag it away, while holding the Ctrl key down. Notice the little black arrow in one corner if the icon? Let go of the mouse and you've created a shortcut to that .EXE.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007

            H 1 Reply Last reply
            0
            • D Dave Kreskowiak

              I've never heard of a "job" file. Nothing in Windows ever uses one. To create a shortcut is very easy. click and hold the mouse of your .EXE file and drag it away, while holding the Ctrl key down. Notice the little black arrow in one corner if the icon? Let go of the mouse and you've created a shortcut to that .EXE.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007

              H Offline
              H Offline
              Hesham Yassin
              wrote on last edited by
              #6

              i know how to use it menually. but how can i do it by C#. i mean how can i create a shortCut by C#? but if you entered to the StartUp directory, there is a *.job files. these files containing a details which relevant to activating the program, when and where.....:(

              O 1 Reply Last reply
              0
              • H Hesham Yassin

                i know how to use it menually. but how can i do it by C#. i mean how can i create a shortCut by C#? but if you entered to the StartUp directory, there is a *.job files. these files containing a details which relevant to activating the program, when and where.....:(

                O Offline
                O Offline
                originSH
                wrote on last edited by
                #7

                Job files are used by the scheduler, they are for running a program at a set date and time. As for creating a shortcut, yet again google provides the answer: http://www.google.co.uk/search?hl=en&q=create+shortcut+c%23&meta=[^]

                D 1 Reply Last reply
                0
                • O originSH

                  Job files are used by the scheduler, they are for running a program at a set date and time. As for creating a shortcut, yet again google provides the answer: http://www.google.co.uk/search?hl=en&q=create+shortcut+c%23&meta=[^]

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #8

                  :-D Beat me to it!

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                       2006, 2007

                  O 1 Reply Last reply
                  0
                  • D Dave Kreskowiak

                    :-D Beat me to it!

                    A guide to posting questions on CodeProject[^]
                    Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                         2006, 2007

                    O Offline
                    O Offline
                    originSH
                    wrote on last edited by
                    #9

                    ;)

                    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