For a smaller project, I needed to find a way to restart my Adobe AIR application, this had to be invoked by itself …
After some research I found a working examples, thanks to Flex Internals.
[code lang="actionscript"]
import mx.core.Application;
import mx.core.WindowedApplication;
import adobe.utils.ProductManager;
public function restart():void
{
var app:WindowedApplication = WindowedApplication(Application.application);
var mgr:ProductManager = new ProductManager("airappinstaller");
mgr.launch("-launch " + app.nativeApplication.applicationID + " " + app.nativeApplication.publisherID);
app.close();
}
[/code]
Just make sure your “allowBrowserInvocation” option is turned on (value to true) in AIR application descriptor template
[code lang="actionscript"]
[/code]