答案 0 :(得分:7)
亲爱的亲爱的,我已经为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();
}
}
答案 1 :(得分:3)
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();
}
}
还要确保 “allowBrowserInvocation”选项是 在AIR应用程序中打开 描述符模板