Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6596153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:02:15+00:00 2026-05-25T18:02:15+00:00

how can I run an app automatic after restart? (by c# code) I create

  • 0

how can I run an app automatic after restart?
(by c# code) I create A new string in ‘runOnce’ key in registry with the path of the App.
the OS run this APP before it load the OS
my problem is: My APP loads but explorer doesn’t load, after I close my APP, explorer loads
I restart the computer in APP, and after restart I want that my APP reopen

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:02:16+00:00Added an answer on May 25, 2026 at 6:02 pm

    When you click restart from your app, make the following modifications to the registry:

    Create an entry in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run registry branch.

    Use

    Registry.LocalMachine.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\YourAppName");
    

    to create an entry.

    And

    RegistryKey myKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\YourAppName", true);
    
    myKey.SetValue("YourAppName", "AppExecutablePath", RegistryValueKind.String);
    

    to set the run path.

    After the system has restarted, your app starts and removes the restart entry by calling this:

    Registry.LocalMachine.DeleteSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\YourAppName");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm hearing this alot, that you can develop an app in WPF and run
Can a LINQ enabled app run on a machine that only has the .NET
Can I run a windows presentation foundation app on a webserver over the internet,
Since the app id is depending on the site name, how can i run
I can't identify the object being deallocated, I run my app with Command+Y but
Can a WinForms app compiled for Any CPU be configured to run as x86
My ASP.NET (3.5) app allows users to run some complex queries that can take
I can run this command in SqlManager to detach the db ALTER DATABASE mydb
i am new to automating the android app.I heard that from Monkeyrunner we can
I can run and debug my Android app on my phone just fine, most

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.