Solved

Visual Basic 2008 - not this EXE please

Posted on 2011-09-29
3
221 Views
Last Modified: 2012-05-12
I have a project that is started by running EPDLauncher.exe  The EPDLauncher's job is to look to see if there are any updates to all the EXE's and DLL's of the project.  If so, they are copied to the local machine, and then EPD.exe is executed and the program begins.
Sometimes the client sets up a shortcut that starts EPD.exe instead of EPDLauncher.  This works until there is an update[s] that never get copied to the PC because EPDLauncher is never run again.
What would be the required logic to determine if EPD.exe is started on its own or started by EPDLauncher.  I would like to tell the user via a message box: "you have started EPD.exe directly instead of EPDLauncher so no updates have been applied"
0
Comment
Question by:dastaub
3 Comments
 
LVL 25

Expert Comment

by:Luis Pérez
ID: 36815816
You can do it easily communicating the two processes using Atoms. Read my article about that, you'll see that is extremely useful and easy:

http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/A_233-Inter-communicate-applications-with-Atoms.html

The idea is that launcher stores an Atom (something like saying "I've started you") that is deleted from main exe when started. If main exe doesn't found that atom, you can apply the program logic that you want.

Hope that helps.
0
 
LVL 29

Accepted Solution

by:
nffvrxqgrcfqvvc earned 500 total points
ID: 36816182
In your EPDLauncher you want to create  named Mutex. Then in your EPD application you want to check if the named Mutex already exists. If the Mutex doesn't exist then EPDLauncher wasn't started and EPD.EXE was run directly.
0
 

Author Comment

by:dastaub
ID: 36816448
In your EPDLauncher you want to create  named Mutex. Then in your EPD application you want to check if the named Mutex already exists. If the Mutex doesn't exist then EPDLauncher wasn't started and EPD.EXE was run directly.

Sounds simple, but how do you create Mutex and then check to see if Mutex exists.  What is Mutex?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question