Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hey everyone,

 

I am hoping that this site will offer the expertise, and hopefully the assistance that other sites have been unable to give.

 

I asked the question that follows on STACKOVERFLOW (my local place for assistance) a week ago, with no luck, and today posted on the msdn dev forums which has also received no information....

 

I shall begin...

 

My Aim:

I intend to make a program, which has two (potentially more) components. The first is a Windows form, nice and clean with some options on for a user to choose. In the most basic example, a user can choose an executable and push a button. This choice is then saved 'somewhere' and passed to our second component, the windows service, which then checks if its running, and if it is, kill the process.

 

Currently I have the service working by itself, with a hardwired executable (calc.exe) and it runs smoothly, ending that ***** whenever it pops up. However my attempts to pass information from a windows form to the service have all failed.

 

I have tried various things such as:

 

string[] myArgs = new string[1] { textBox1.Text };
serviceController1.Start(myArgs);

 

or...

 

serviceController1.Pause();
serviceController1.Continue(MyArgs);

 

Neither work...

 

So I pose the question, is it possible? I thought it was, as an Antivirus/Firewall (take Nortons) has a front end GUI which passes stuff to the backend.

 

Btw this program will be installed with ADMIN Privileges.

 

Is there an alternative to what I am trying to do? Am I going about it wrong?

 

Here is the original link:

 

StackOverflow Question

 

Thanks everyone

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...