Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi Guys,

 

Is there any way to implement the logic below

 

Check whether Test.exe is running or not. If its running, dont do anything.

If it is not running, launch it

 

 

Thank you very much

Posted (edited)

wOWOWO..Excellentttt...thax a lottttt...

 

But im confused a little

 

if procs.Length == 0 , then we should start up Test.exe ..

 

Normally if the file is not running, meaning procs.Length will return 0 right?

 

And im confused about another thing..

 

Whenever i put this code and create new project as a "Windows Service",

No matter the executable is running or not, it always says that its running. Although it is not running..Pretty weird..

 

If its windows application, when i debug, it works well..

 

But when i create a service, it does not..

 

Any idea?

Edited by a1jit

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...