Jump to content

Allow only one instance of executable


Recommended Posts

Perhpaps you need the correct capitalization? Linux (in general) is capital aware while Windows is not.

If I look at a windows LabVIEW.exe it has the following string somewhere in the binary file: allowMultipleInstances so you might need to CamelCase your INI key.

I'd test:

AllowMultipleInstances

allowMultipleInstances

 

And I'd test it with different spellings of False/false/FALSE

 

Ton

Link to post
Share on other sites

I wouldn't think capitalization is the issue, simply because I thought that it defaulted to false.  Meaning if there was no entry in the INI it wouldn't allow multiple instances, and only if you set it to true does its behavior change.  Sorry never see this before.

Link to post
Share on other sites

Under Windows there is a special root loop in LabVIEW that registers a LabVIEW Window Class on startup. That supposedly fails when it is already registered and in old days LabVIEW simply passed control to that other instance and then terminated.

 

The allowMultipleInstances ini key is a fairly new addition (well around LabVIEW 7 or so) that seems to make LabVIEW not terminate on RegisterClass() returning an error but instead simply continues. Under Linux there is no such mechanisme and it is even more unusual for an application to not allow being started more than once. They would have to add some internal IPC mechanisme to check for that on startup and I'm sure that never really has come up so far and even a Product Suggestion has a very low chance to ever make it into LabVIEW.

 

allowMultipleInstances most likely is nowhere present in any non-Windows version of LabVIEW.

 

However, at least in Linux (and I suppose on OSX too) you can easily do this by creating a startup shell script for your LabVIEW application and check in there with shell commands for the existence of another instance of the same app. Look here for a fairly simple possibility to do that.

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.