If you are used to using the ApplicationUpdaterUI class for providing the auto update feature for your AIR application, and have recently started to work on the new Native Process API in Adobe Air 2 beta for compiling into a Native app, you would realize that the auto update functionality just doesn’t work. This is because the ApplicationUpdaterUI is designed to work only for the default AIR applications (.air). If you want to provide auto update functionality for your executables (.exe), you need to rather use the ApplicationUpdater Class. You don’t have to modify the update.xml file. The only difference is since this is an executable, you can’t do an auto upgrade of the file. Rather, you will need to let the user download the file (if you are trying the update the .exe file). The most simplest way to do it is to capture the “UpdateStatus” event of the ApplicationUpdater and check if an update is available and then trigger a ‘navigateToURL”. Checking if there is a new version available can be done using the “StatusUpdateEvent.available” property. Here is the code that you can use.
private function checkForUpdate():void
{
appUpdater.updateURL=”<path>/update.xml”; // Server-side XML file describing update
appUpdater.addEventListener(UpdateEvent.INITIALIZED, onUpdate); // Once initialized, run onUpdate
appUpdater.addEventListener(StatusUpdateEvent.UPDATE_STATUS, onUpdateStatus);
appUpdater.addEventListener(ErrorEvent.ERROR, onError); // If something goes wrong, run onError
appUpdater.initialize(); // Initialize the update framework
}private function onError(e:UpdateEvent):void
{
Alert.show(e.toString());
}private function onUpdate(e:UpdateEvent):void
{
appUpdater.checkNow();
}private function onUpdateStatus(event:StatusUpdateEvent):void
{
if( event.available ) {
// set an information text for the user
application.updateInfo.label = “An updated version ” +
event.version + ” is available. Click here to download.”;
// or directly display a download prompt
var urlReq:URLRequest = new URLRequest(“<url to the executable>”);
navigateToURL(urlReq);
}
}

Hi,
Is it possible to update using appUpdater.updateURL ??
appUpdater.updateURL provides the location of the descriptor file. It contains information on where to download the file from as well as the version. But you still need to verify if the client copy needs an update or not (based on versions) and then provide a prompt to the client for upgrade, if required.
That still shows the default update dialogbox!
To prevent them use the code as follows and stoping the updater:
—————-
private function checkForUpdate():void
{
// Find the current version so we can show it below
setApplicationVersion();
// Server-side XML file describing update
appUpdater.updateURL = ApplicationController.UPDATE_URL;
// We won’t ask permission to check for an update
appUpdater.isCheckForUpdateVisible = false;
//versions detection
appUpdater.isNewerVersionFunction = compareVersion;
// Once initialized, run onUpdate
appUpdater.addEventListener(UpdateEvent.INITIALIZED, updateInitializedHandler);
// If something goes wrong, run onError
appUpdater.addEventListener(ErrorEvent.ERROR, updateErrorHandler);
// Initialize the update framework
appUpdater.initialize();
}
private function compareVersion(currentVersion:String, updateVersion:String):Boolean
{
//stop showing default updater dialogbox
appUpdater.cancelUpdate();
//compare versions
if(currentVersion != updateVersion)
{
// set an information text for the user
var dialogCopy:String = “An updated version ” +updateVersion + ” is available. Click here to download.”;
// or directly display a download prompt
//var urlReq:URLRequest = new URLRequest(“”);
//navigateToURL(urlReq);
}
return false;
}