473,408 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

checking if app is running already?

Good morning

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

Thank
Deasun
Jul 21 '05 #1
3 1545
Deasun <an*******@discussions.microsoft.com> 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 - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2
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)
Jul 21 '05 #3
Deasun <an*******@discussions.microsoft.com> 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 - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Randy Wayne | last post by:
I use a program that imports into Excel that requires that the workbook is closed prior to the import. How do you check to see if an Excel workbook is open, and then close the workbook? How...
5
by: kd | last post by:
Hi All, If the name of a process is known, is it possible to check whether it is in execution? What I did was to fetch all the processes running on the system using Process.GetProcesses() and...
3
by: Deasun | last post by:
Good morning In vb.net how would one go about checking if the app is already running Need some pointers on this Thank Deasun
7
by: pradeep_TP | last post by:
hello all, I want to know how can I check whether a web site us running or not. I have used HttpWebRequest but when I give a web site address, It takes few number of seconds to throw exception...
5
by: plmanikandan | last post by:
Hi, I am having a exe application which will be triggered by a external program.I need to check whether the exe is already running or not.If the exe is runing i need to discard the external...
16
by: Claudio Grondi | last post by:
Sometimes it is known in advance, that the time spent in a loop will be in order of minutes or even hours, so it makes sense to optimize each element in the loop to make it run faster. One of...
2
by: D & J G | last post by:
Bit of a newbie question.. Is there a VB6 way of telling what is already running? E.g. if a VB6 program has been minimized and selected again, the minimized one maximizes, instead of having the...
125
by: jacob navia | last post by:
We hear very often in this discussion group that bounds checking, or safety tests are too expensive to be used in C. Several researchers of UCSD have published an interesting paper about this...
1
by: geetamadhavi | last post by:
Hi All, I have developed a php applciaiton where a new window is opening on checking the whether valid user orntot how to make that in same window after checking i have die(' not valid user ' ); i...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.