PC Review


Reply
Thread Tools Rate Thread

checking if app is running already?

 
 
=?Utf-8?B?RGVhc3Vu?=
Guest
Posts: n/a
 
      18th May 2004
Good morning

In vb.net how would one go about checking if the app is already running
Need some pointers on this

Thank
Deasun
 
Reply With Quote
 
 
 
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      18th May 2004
Deasun <(E-Mail Removed)> wrote:
> In vb.net how would one go about checking if the app is already running?
> Need some pointers on this.


See http://www.pobox.com/~skeet/csharp/f...ation.instance

(Phrased in C# terms, but easily understandable anyway.)

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
=?Utf-8?B?RGVhc3Vu?=
Guest
Posts: n/a
 
      18th May 2004
Thanks for the reply
itried what you gave me, but it comes back with
The filename, directory name, or volume label syntax is incorrect
Same error message with all the code below

Any ideas to what is wrong? I am doing something wrong with the string value

Thank

Heres what i tried: (VB Sorry

1
Dim firstInstance As Boolea
Dim mut As New Mutex(False, "Local\\C:\Program Files\CBSSE Apps\IT Utilities\F-Scan\bin\F-Scan.exe", firstInstance
2
Dim firstInstance As Boolea
Dim mut As New Mutex(False, "Local\\F-Scan.exe", firstInstance
3
Dim firstInstance As Boolea
Dim mut As New Mutex(False, "F-Scan.exe", firstInstance)
 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      18th May 2004
Deasun <(E-Mail Removed)> wrote:
> Thanks for the reply.
> itried what you gave me, but it comes back with
> The filename, directory name, or volume label syntax is incorrect.
> Same error message with all the code below.
>
> Any ideas to what is wrong? I am doing something wrong with the string value?


Yes. Firstly, you don't need the \\ - that's a C# escape sequence for
\. Secondly, you don't want to put the whole path to your app in the
string - just some unique name.

So, you might want:

"Local\CBSSE APPS - F-Scan"

> Thanks
>
> Heres what i tried: (VB Sorry )
>
> 1]
> Dim firstInstance As Boolean
> Dim mut As New Mutex(False, "Local\\C:\Program Files\CBSSE Apps\IT
> Utilities\F-Scan\bin\F-Scan.exe", firstInstance)
> 2]
> Dim firstInstance As Boolean
> Dim mut As New Mutex(False, "Local\\F-Scan.exe", firstInstance)
> 3]
> Dim firstInstance As Boolean
> Dim mut As New Mutex(False, "F-Scan.exe", firstInstance)


That last one should have worked, albeit not as a local mutex.

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
programmatically checking if app is running Mike P Microsoft C# .NET 2 22nd Mar 2007 05:49 PM
checking for a running app L3Tech Microsoft Excel Programming 1 19th Jan 2006 01:01 AM
Checking for other running CF applications Andrew Mac Microsoft Dot NET Compact Framework 6 22nd Sep 2004 05:18 PM
Vba - Checking if running ajliaks Microsoft Excel Programming 2 11th Sep 2004 06:09 PM
Checking if running MadCrazyNewbie Microsoft VB .NET 4 13th Apr 2004 06:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:49 AM.