Skip to main content
Participant
December 12, 2014
Question

Adobe AIR Windows app instance control

  • December 12, 2014
  • 1 reply
  • 850 views

Hello!

I´have an old Adobe AIR Windows app. How can I prevent multiple instances of the app. For example one user account launches the app on login, then on a user switch a new instance is started. I want only one instance of the app running. I come up with an idéa of creating a .lock file that is created on start and deleted on app close. But what happens if the power of the computer is removed? Then the .lock file is present and the app can´t launch again. Any idéas?

This topic has been closed for replies.

1 reply

December 12, 2014

Are you certain that the previous users instance of the app is still running when that user is logged out? Unless Adobe has changed how AIR works in recent years, AIR is built to only allow one instance of the application to be running. In fact, that has been a complaint by some people who figured out how to get around that limitation so they could have multiple instances of the app running at once.

flash - starting an Adobe AIR application multiple times - Stack Overflow

freke1981Author
Participant
December 12, 2014

Thanks for your answer. I think you are correct about that only one instance per user session is allowed. But the problem I have is that there are files that downloads from an api, app settings etc. that need to be shared between the users and then synced to a tablet via USB. So for now I save all files i an root folder. So all users can access them.

I´ve read some where that a possible solution is to open a file and keep it open, not sure if I can check for file locks with AIR when I switch users in Windows.