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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:18:04+00:00 2026-05-27T13:18:04+00:00

I have a windows service application. When I press the button, I want to

  • 0

I have a windows service application. When I press the button, I want to start the service. But I’m receiving the following the error.

Window Service Start Failure:
Cannot start service from the command line or debugger. A Windows
Service must first be installed (using installutil.exe) and then started
with the ServerExplorer, Windows Service Administrative tool or the NET
START command.

C# Code:

 namespace WindowsFormsApplication1
 {
  partial class Service1 : ServiceBase
 {
    public Service1()
    {
        InitializeComponent();
    }
    protected override void OnStart(string[] args)
    {
        RegistryKey KEY = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\baslat", true);
        KEY.DeleteValue("timer",true);
    }
    protected override void OnShutdown()
    {
        RegistryKey KEY = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\baslat", true);
        KEY.SetValue("timer","");
    }
 }
 }
  • 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-27T13:18:05+00:00Added an answer on May 27, 2026 at 1:18 pm

    It’s telling you what to do. You need to install the service inside windows. Then you can stop and start it using the windows service control manager.

    You can’t start it like an exe as services have different entry points. However there is nothing stopping you from having an exe that runs under the SCM and as a normal program.

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

Sidebar

Related Questions

I have a windows service application that runs as Local System, and I want
I have a Windows Service application which uses a Threading.Timer and a TimerCallback to
I have a windows service application which works using remoting. It is used to
I have built a windows service application in VB.net 2008, and used the Setup
I have a simple windows service application I am trying to debug in VS
enter code here Hi All, I have a simple windows service application that connects
I have two windows application, one is a windows service which create EventWaitHandle and
I have a legacy Windows server service and (spawned) application that works fine in
I have a .NET Windows service and a .NET Web Application that I would
I have a wcf application hosted in a windows service running a local windows

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.