1 person found this helpful
There is a "First time" concept in AIR application (http://help.adobe.com/en_US/AIR/1.5/devappsflex/devappsflex.pdf).
Suggest you add a piece of logic in your application before checking arguments: if it is first time to run the application, shut it down right away.
Let us know if you find good solutions.
Thanks a lot, that is very helpful.
To solve my problem I am going to use that method (Create a new file @ startup, see if it exists, and if it does not exist then it is the first time running) and tweak it a little to solve my exact problem.
I need to be sure that the application is being run after installation (from the installer), because the user MAY select "do not run after install", in which case the first time they try to run the program by opening an associated file, the program will exit, which is not a good first impression to leave on the user.
So I will check if the file exists created and if then i will check if arguments (file name) is being passed.
1. If a file name argument is passed I'll create the file and continue running to program. - First time run, but not from installer.
2. If no argument is present and it is the first time, I will shut down immediately with no message. - First time running/run from installer.
3. If no argument is present and file exists, exit with error (file needed). - Not the first time run, but no argument passed.
4. If argument exists and and file exists, run program. - Normal execution.
Thanks for letting us know your solutions. It sounds like a good plan.