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 6600639
In Process

The Archive Base Latest Questions

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

I was wandering if someone could explain to me how I could make my

  • 0

I was wandering if someone could explain to me how I could make my Program run on startup?
My program is a C# WCF with a small WPF UI that has to run on a server, and I need to make sure that the program will start whenever that server restarts or for whatever other reason.

I have had a look around, and it appears that I have to use the registry keys but I am not to familiar with how to use registries keys, could someone please explain to me how I could use this. I am using VS2010 with creating an Installer and I would like to set the registry key when it installs 🙂

P.S. I don’t want the application to be a Windows Service, and I can’t just put it in the startup folder for a user(cause what if the server restarts and no one logs in?)

  • 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:39:04+00:00Added an answer on May 25, 2026 at 6:39 pm

    Add something to run:

    http://www.geekpedia.com/tutorial151_Run-the-application-at-Windows-startup.html

    RegistryKey rkApp = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
    
    rkApp.SetValue("MyApp", Application.ExecutablePath.ToString());
    

    UPDATE: After thinking about this some more, this probably won’t help you because your approach appears to be fundamentally flawed. Somebody still needs to log in order for a UI to run. How about this for a solution:

    Push the services back to a windows service (as everyone else has suggested). For the WPF UI piece, separate that from the exe that hosts the WCF services into its own project. Just expose another service endpoint contract that the UI can use to manage / monitor the service.

    That opens up the door to being able to monitor the server from a different machine. Also, you don’t have to worry about more than one person logging into the server at the same time (a likely scenario in many environments) and spinning up multiple instances of the service host.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just wondering if someone could explain this to me? I have a program that
I was wondering if someone could explain to me how to make a simple
I was wandering if someone could explain to me how I could do a
I am wondering if someone could explain how I can utilise tags in an
Wondering if someone could please explain the difference between these two queries and advise
I was wondering if someone could tell me what I am doing wrong that
I was wondering if someone could explain how the following code works: public interface
I was wondering if someone could explain in detail what (int)(l ^ (l >>>
I was wondering if someone could explain to me what the #pragma pack preprocessor
i'm new to obj-c and i was just wondering if someone could explain this.

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.