dastaub
asked on
Visual Basic 2008 - not this EXE please
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"
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"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
Sounds simple, but how do you create Mutex and then check to see if Mutex exists. What is Mutex?
https://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.