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 to Create a Project run on Windows Startup using C#.Net

How to Create a Project run on Windows Startup using C#.Net

Scheduled Pinned Locked Moved C#
csharptutorialquestion
5 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.
  • V Offline
    V Offline
    vasanth arivali
    wrote on last edited by
    #1

    Hai Friends, I want to create a .net application that run on windows startup. How can i create that. Guide me with your Ideas. Thanks, Vasanth.A

    L 1 Reply Last reply
    0
    • V vasanth arivali

      Hai Friends, I want to create a .net application that run on windows startup. How can i create that. Guide me with your Ideas. Thanks, Vasanth.A

      L Offline
      L Offline
      Laserson
      wrote on last edited by
      #2

      Create a new registry key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run and then add a new key-value (MyApp - C:\MyApp.exe)

      using Microsoft.Win32;

      private void CreateStartup() {

      RegistryKey Key=Registry.LocalMachine.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
      Key.SetValue("MyApp", Application.ExecutablePath);
      }

      M 1 Reply Last reply
      0
      • L Laserson

        Create a new registry key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run and then add a new key-value (MyApp - C:\MyApp.exe)

        using Microsoft.Win32;

        private void CreateStartup() {

        RegistryKey Key=Registry.LocalMachine.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
        Key.SetValue("MyApp", Application.ExecutablePath);
        }

        M Offline
        M Offline
        Muhammad Mazhar
        wrote on last edited by
        #3

        I think you can also try to create a scheduled task.

        Share your experience with others Check my Blog...

        S 1 Reply Last reply
        0
        • M Muhammad Mazhar

          I think you can also try to create a scheduled task.

          Share your experience with others Check my Blog...

          S Offline
          S Offline
          senguptaamlan
          wrote on last edited by
          #4

          I don't think that will help, schedular task, actually invokes a task or a bartch on a redefined time, its not responsive to windows startup. Its better to to add the entry in registry.

          M 1 Reply Last reply
          0
          • S senguptaamlan

            I don't think that will help, schedular task, actually invokes a task or a bartch on a redefined time, its not responsive to windows startup. Its better to to add the entry in registry.

            M Offline
            M Offline
            Muhammad Mazhar
            wrote on last edited by
            #5

            sounds good

            Share your experience with others Check my Blog...

            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