How to restart the standalone Adobe Air / Flex application

How can I get a standalone Adobe Air / Flex application to restart?

It does not work with the proposed solution: http://www.colettas.org/?p=267 .

Any help would be great,

Thanks.

+6
flex air adobe
source share
2 answers
package { import mx.core.Application; import mx.core.WindowedApplication; import adobe.utils.ProductManager; public function reboot():void { var app:WindowedApplication = WindowedApplication(Application.application); var mgr:ProductManager = new ProductManager("airappinstaller"); mgr.launch("-launch " + app.nativeApplication.applicationID + " " + app.nativeApplication.publisherID); app.close(); } } 

Also ensure that the "allowBrowserInvocation" option is enabled in the AIR application descriptor template

"How to restart an AIR application from code"

+3
source share

Hello dear, I fixed this method for Flex 4.6

 package { import adobe.utils.ProductManager; import flash.desktop.NativeApplication; import mx.core.FlexGlobals; import spark.components.WindowedApplication; public function Reboot():void { var app:WindowedApplication = WindowedApplication(FlexGlobals.topLevelApplication); var mgr:ProductManager = new ProductManager("airappinstaller"); mgr.launch("-launch "+app.nativeApplication.applicationID+" "+app.nativeApplication.publisherID); app.close(); } } 
+7
source share