G
Guest
Hi
I am developing one Windows App. I want the user should run only one
instance at time of application. But i have also two variant of this Assembly
in same code which depends on some file of current application folder. I dont
want that user can run same variant at time, but user can run two separte
instance of two variant from two different folder.
For E.g
Varint.Exe is C:\A folder
Varint.Exe is in C:\B folder
If user run the Varint.exe from folder A twice it should not run. But if
user run Varint from A and then from B. He should be alllowed. Because both
version will changes its logic at runtime depending on other files present in
the application's executable folder.
What I currently do is to find out process of the same name(Variant.Exe), if
the its are different then exit second instance which user tried. Its working
but for only one case ie no same name application varint should start. Its
not working for other case ie user can run two variant at the same type.
I want to use interprocess communication for this. When first instance is
running it will keep some data into memory. When second instance tries to
load. it will first check for the existance of data, if data is present it
will not load it self.
But i dont know how to implement this logic.
Could anyone please help me out?
I am developing one Windows App. I want the user should run only one
instance at time of application. But i have also two variant of this Assembly
in same code which depends on some file of current application folder. I dont
want that user can run same variant at time, but user can run two separte
instance of two variant from two different folder.
For E.g
Varint.Exe is C:\A folder
Varint.Exe is in C:\B folder
If user run the Varint.exe from folder A twice it should not run. But if
user run Varint from A and then from B. He should be alllowed. Because both
version will changes its logic at runtime depending on other files present in
the application's executable folder.
What I currently do is to find out process of the same name(Variant.Exe), if
the its are different then exit second instance which user tried. Its working
but for only one case ie no same name application varint should start. Its
not working for other case ie user can run two variant at the same type.
I want to use interprocess communication for this. When first instance is
running it will keep some data into memory. When second instance tries to
load. it will first check for the existance of data, if data is present it
will not load it self.
But i dont know how to implement this logic.
Could anyone please help me out?