04-02-2013 08:32 AM
What, in v2011, is the default setting of the AllowMultipleInstances value of the ini file? I know that it isn't a normally included field in the ini file generated when an exe is built, I'm just wondering what the value is by default? I've added it to the ini file, set to False, on a machine I'm trying to troubleshoot which has a program launch so slow that the operators frequently go back and try and launch it again, which results in two instances, only one of which is correctly running.
Solved! Go to Solution.
04-02-2013 09:06 AM
Testing with any simple program it appears that the default value is false as usual.
Maybe your executable is so heavy during load time that it's not "recognizable" by a later instance for a long time?
In this case you may write a light stub program to be launched by the user instead of the main one.
The stub should run the main via a cmd file or SystemExec; it would allow to give a prompt feedback to the user; it should stay up for enough time to let the main appear, then shutdown itself.
04-02-2013 09:20 AM
@pincpanter wrote:
...it appears that the default value is false...
I can concur that this appears to be the case for a simple executable.
Maybe when the executable loads a large number of VIs before beginning execution it doesn't register itself with whatever service needs to know until it is actually executing, and if the executable is double-clicked again before this point it may be able to launch a second instance.
This is harder to test without creating a substantial executable.
04-02-2013 10:38 AM
As I thought, regarding the default, just wanted someone not on one of our development machines to take a look. Thanks, to both of you. That may be what we have to do, a launcher that looks for any instance of the exe running before launching another. Thank You.