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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:02:45+00:00 2026-06-03T01:02:45+00:00

I am working on something similar to this question asked in 2010 How to

  • 0

I am working on something similar to this question asked in 2010

How to call Windows application using Windows service in C#?

This answer might be the solution to my problem

https://stackoverflow.com/a/2309089/1270384

Although I don’t know how to do that.

Was wondering if somebody could give me an example of what is being mentioned or something similar, namely the process class being mentioned or just a brief example of how to go about the instructions given.

Update

I have a web application that checks my database for changes to a particular table. I’d like my application to be called inside of this windows service that I am trying to create which I’d like to schedule to run every 20seconds.

I’m new to windows services so didn’t quite get what was being explained.

Any clarification would be greatly appreciated.

  • 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-06-03T01:02:46+00:00Added an answer on June 3, 2026 at 1:02 am

    In the services control panel, on the Log On tab, check the “Allow Service to interact with Desktop” check box. then your can do something like this.

    public class WinService : ServiceBase
    {
    Process p = new Process();
    
    public WinService()
    {
    InitializeComponent();
    }
    
    protected override void OnStart(string[] args)
    {
    RunApp();
    }
    
    private void RunApp()
    {
    p.StartInfo.FileName = @"<path to your app>";
    p.StartInfo.Arguments = "<your params>";
    p.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
    p.Start();
    }
    
    protected override void OnStop()
    {
    p.Kill();
    }
    }
    

    EDIT: parameters passing:

    List all the parameters in startInfo.Arguments, separate them by blanks.
    Numeric parameters are listed as is, string paarameters are listed in quotes.

    Example:

    If the command line for your applpication is:

    YourApp.exe param1 "param two" param3
    

    then your startInfo.Arguments should be set to:

    startInfo.Arguments = "param1 \"param two\" param3";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(I asked a similar question here and found a working solution under certain circumstances,
I want to know i can do something similar to this (not working) code
I've been trying to get something working in a windows 8 metro style application,
This question seems similar to those asked in a few other posts: here and
I've asked a similar question before here and the answer solved my problem. However,
This question is very similar to this one . However, the accepted answer (and
I am trying to do something similar to what the user who asked this
I am working on a tool similar to the one described in this question,
I know this very similar question has been asked before quite a few times
This question, asked a year ago, is similar: Does the Entity Framework 4 support

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.