My Problem is i want to update my AIR application from a local system path, it 
can be central download location or a third app which is monitoring the 
updates, which downloads the new AIR file to the central location.

I have tried using installFromAIRFile method from the ApplicationUpdaterUI 
class to update my application, but no success. I suspect I might be using this 
message incorrectly. I have attached below the code snippet what i have tried.

public function updateApplication1():void{                              
                                var airFile:File = 
File.desktopDirectory.resolvePath("UtilityWizard.air");                         
                                         
                    _appUpdater = new ApplicationUpdaterUI();
                    _appUpdater.updateURL = airFile.url;                    
                    _appUpdater.addEventListener(UpdateEvent.INITIALIZED, 
updateIntializeHandler);                                                        
                                              
                                
_appUpdater.addEventListener(StatusFileUpdateEvent.FILE_UPDATE_STATUS, 
fileUpdateStatusHandler);                                                       
                 
                                
_appUpdater.addEventListener(StatusUpdateErrorEvent.UPDATE_ERROR, 
updateErrorHandler);
                                _appUpdater.initialize();                       
                                
                        }       

  
private function updateIntializeHandler(e:UpdateEvent):void {                   
        
                   var airFile:File = 
File.desktopDirectory.resolvePath("UtilityWizard.air");                         
          
                    _appUpdater.installFromAIRFile(airFile);
                }

 private function fileUpdateStatusHandler(e:StatusFileUpdateEvent):void{        
                
                        Alert.show(e.available.toString());                     
                }       

                private function 
updateErrorHandler(e:StatusUpdateErrorEvent):void{
                        Alert.show(e.text);
                }


Please guide me to the correct path, or that is something not possible.

Thanks in advance

Vishal

Reply via email to