473,408 Members | 2,417 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.

How to uniquely identify a process?

Hi all

The question is simple:
How can I find out if an executable is running apart from verifying
process name, path, program title etc which does not ensure uniqueness?
I think classid (GUID) could help but I dont know if it is the right
direction and how to achieve this. Any advise is welcomed!

Thanks

Nov 22 '06 #1
2 1420

01*******@gmail.com ¼g¹D¡G
Hi all

The question is simple:
How can I find out if an executable is running apart from verifying
process name, path, program title etc which does not ensure uniqueness?
I think classid (GUID) could help but I dont know if it is the right
direction and how to achieve this. Any advise is welcomed!

Thanks
OK I got it

Process.getType.GUID.toString()

Nov 22 '06 #2

01*******@gmail.com wrote:
Hi all

The question is simple:
How can I find out if an executable is running apart from verifying
process name, path, program title etc which does not ensure uniqueness?
I think classid (GUID) could help but I dont know if it is the right
direction and how to achieve this. Any advise is welcomed!

Thanks
This is generally done with a mutex.

public sub main
dim created as bool
dim instanceCheck as new mutex (true, "MY_UNIQUE_MUTEX_NAME",
created)

if created then ' we got the mutex
try
application.run (new form1())
finally
instanceCheck.ReleaseMutex () ' make sure we release this bad
boy
end try
else
' process already running
' i've been known to use WM_COPYDATA to send messages to prev
instances :)
end if

end sub

HTH,
Tom Shelton

Nov 22 '06 #3

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

Similar topics

0
by: Ross | last post by:
Hello everybody, When I try to configure my data adapter for ODBC I get the error "Could not determine which columns uniquely identify the rows for "Shipments"." This is for my update and delete...
6
by: Alan Silver | last post by:
Hello, After much battling, I think I am finally seeing some progress on my first user control (thanks to the patient souls who have answered my many questions!!). I am left with one more...
0
by: bazzer | last post by:
im trying to access a microsoft access database from an asp.net webform. but when i use the OdbcDataAdapter config wizard i get the following errors: *Generated UPDATE statement -could not...
1
by: Anoop Nair | last post by:
Hi I am developing scripts in C# which can be used to test windows based applications. I use Win32 API's to perform click operations etc. To uniquely identify a control in a window rather than ...
1
by: 01423481d | last post by:
Hi all Here is a segment of code used to find out all running processes Imports System.Diagnostics .... Dim myProcesses() As Process Dim myProcess As Process
1
by: nano2k | last post by:
Hi I have an application (let's call it Main.exe) and a helper process (call it Update.exe) that periodically updates Main app. Update.exe needs to reside in memory, but I need to make sure that...
10
by: Frankie | last post by:
It appears that System.Random would provide an acceptable means through which to generate a unique value used to identify multiple/concurrent asynchronous tasks. The usage of the value under...
6
by: Ryan Liu | last post by:
Hi, If I want to uniquely identify a computer. I can read CPU ID or Mac Address. I heard, but is this true: some BIOS can block CPU ID from being read? (In this case, will I get an exception,...
23
by: raylopez99 | last post by:
A quick sanity check, and I think I am correct, but just to make sure: if you have a bunch of objects that are very much like one another you can uniquely track them simply by using an ArrayList...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.