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

  • Home
  • SEARCH
  • 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 940505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:58:08+00:00 2026-05-15T21:58:08+00:00

I have written a tool that is run on the command line. I can

  • 0

I have written a tool that is run on the command line.
I can test it on the command line on my machine, and it works fine.
I then remote into the target server machine and run it on the command line there, and it still works.

However…this tool needs to remain running (its a monitoring tool).
I can’t leave my remote session to that machine open for too long, as other people need to use it, and when I close my remote session, that command line tool ends.

I don’t know how to, and would like to avoid needing to, write a windows service, but essentially I need that capability. I need to almost wrap my command line tool with a windows service that can remain running on the target machine while I disconnect.

Can anyone provide any insight/strategy on how to do this?

Edit:
Both of the below posts are helpful.

  • 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-15T21:58:09+00:00Added an answer on May 15, 2026 at 9:58 pm

    If it’s Windows Server 2003 or earlier you can use Srvany.exe to run any application as a service. See here for details.

    If it’s Windows Server 2008, SrvAny isn’t supported officially, but you might be able to hack it to work by copying it from Win2003 Resource Kit or earlier and then combining it with the instructions in Thomas answer in some way.

    However, writing a proper Windows Service is really quite simple and it’s the best way to make sure that it’ll coexist happily with everything else.

    Just create a Windows Service project in Visual Studio. In the OnStart you create a thread that runs your code. In the OnStop you use a flag to stop the service. Then you can make it better later.

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

Sidebar

Related Questions

I have the following design request for a visual editing tool written in C++:
I have written a java webservice, deployed it on my tomcat and accessed the
I have this application written in PHP, I'm considering on using eAccelerator for optimizing
I have a whole bunch of unit tests written in MbUnit and I would
I am a novice programmer and as a part of my project I have
I have little experience with ruby itself. I am going to hire somebody to
I've written a collection of data structures and functions in C, some of which
Hi I'm trying to compile about 30 C sources written in 1997. Based on
Forgive me if this is in the wrong place, but I figured a few
ie6 has been bugging me up from a very long time from now. and

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.