We're trying to port a Flash game to Windows. Never targeted Windows using AIR before so this is a new experience for us.
Basically, I'm working on a game Blah that uses ADT to create a native installer (blah_installer.exe) that people can use to install our app (a multiplayer online game).
Importantly, we *need* this software to auto-update itself. You can't do anything in the software without connecting to the server, and you must be running the latest version of the software for the server to accept your connection.
Now, we can't use the built-in Adobe Air update framework, since it does not support native installers (as shown here, it does not have support for extended desktop applications). That's actually fine, because we'd rather write our own updater with its own graphics and all that.
So, we wrote our own updater. Upon starting the application (Blah.exe, which runs Blah_launcher.swf), it pings the server to see what the latest version is, downloads a new version if necessary, and then runs the main application (Blah_main.swf)
Everything was working great, until we got reports from a few testers who discovered that the updater sometimes failed on Windows. In some cases, Blah_launcher.swf was failing to overwrite Blah_main.swf when it was downloaded; the launcher was instead silently running the old version. It turns out that depending on their windows permission settings, they would need to run Blah.exe as an administrator for the updater to work, since it was trying to write a file to the application directory (which is by default c:\program files\Blah\) and Windows does not allow write permission to these directories without administrator permission.
One thing we tried is to download Blah_main.swf to the application storage directory (where we don't need admin permission) and run it from there. Unfortunately, this didn't work, it violates security! Only assets can be loaded from the application storage directory, not code.
But then how can we create an auto-updater for our software? If we can't write to the application directory, but can't run code from outside it, how do we get our program to update itself and always run the latest version?
It would be fine if an admin popup appeared when the updater ran, but I can't even figure out a way to do that. Does ADT provide any way to adjust the manifest settings so that the program can ask for admin permissions when necessary? I looked through all the documentation but I couldn't find anything.
This seems like an extremely common problem for any auto-updating native installer; is there a known solution?