Good morning
In vb.net how would one go about checking if the app is already running
Need some pointers on this
Thank
Deasun 3 1545
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)
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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,...
|
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...
|
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...
|
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,...
| |