Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / November 2003

Tip: Looking for answers? Try searching our database.

how to make sure single instance of exe is running?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nagaraju - 11 Nov 2003 18:46 GMT
Hi,

We are developing a .NET assembly(EXE). We wanted to make
sure that only one instance of EXE running. Is there any
way to verify(using framework classes) other instance
same exe is running or not? If it is then we can exit.

Hope I am clear.

Thanks
Nagaraju
Michael Giagnocavo [MVP] - 11 Nov 2003 19:20 GMT
Sure, you can use a System.Threading.Mutex to achieve this.

http://groups.google.com/groups?sourceid=navclient&ie=UTF-8&oe=UTF-8&q=dotnet+mu
tex+single+instance


2nd result has some code, as do many of the other results.

-mike
MVP

> Hi,
>
[quoted text clipped - 7 lines]
> Thanks
> Nagaraju
Nagaraju - 12 Nov 2003 00:27 GMT
great.

Thanks mike.

-Nagaraju
>-----Original Message-----
>Sure, you can use a System.Threading.Mutex to achieve this.
>
>http://groups.google.com/groups?sourceid=navclient&ie=UTF-8&oe=UTF-
8&q=dotnet+mutex+single+instance

>2nd result has some code, as do many of the other results.
>
[quoted text clipped - 14 lines]
>
>.
Srinivas - 12 Nov 2003 13:21 GMT
HI Nagaraj,

 U can use system.diagnstics name space and find the all
process running on the machine.
if you find your Process name in the Process Collection
you can prompt a MSG and exit the Application

bye
Srinivas
>-----Original Message-----
>Hi,
[quoted text clipped - 9 lines]
>Nagaraju
>.
Michael Giagnocavo [MVP] - 12 Nov 2003 16:52 GMT
That doesn't always work.  What if the user renames the executable?
-mike
MVP

> HI Nagaraj,
>
[quoted text clipped - 18 lines]
> >Nagaraju
> >.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.