Showing posts with label start process. Show all posts
Showing posts with label start process. Show all posts

Thursday, 27 February 2014

Check If Process Running Then Run

 If you need to start a Process but need only a single instance of it to run you can check if
 the process is running then decide where to run yours or not  
 

If proc.ProcessName.StartsWith("aprogram.exe") = False Then   
 Try   
   proc.StartInfo.WorkingDirectory = "C:\Program Files\program \aprogram"       roc.StartInfo.FileName = "C:\Program Files\program\aprogram\aprogram.exe "      proc.StartInfo.Arguments = filename & ".CSV"      proc.Start() 
    Catch ex As Exception 
    msgbox(ex.message)  
 End Try 
 End If
 
 If you are using visual studio and your application is not a console application then 
you could set it as a single  instance application.

Multi Point USB Charger

  USB Plug Charger, 4-Port USB Fast Charger Plug with 33W Intelligent Quick Charge 3.0 Wall Charger, Multi USBPower Adapter UK Fast Charging...