1 Reply Latest reply on Dec 10, 2008 3:15 AM by Cesare Rocchi

    How to find out which browsers are installed on OS?

      Hi everyone,

      I've been reading through the AIR doc, but it doesn't seem like an AIR application can read OS information like what browsers are currently installed. Further, at run time, is there a way to tell which browsers are currently running?

      Best regards,
        • 1. Re: How to find out which browsers are installed on OS?
          Cesare Rocchi Level 2
          I built a small example as a starting point to detect installed applications on a Mac.
          Should be easy to change it for XP/Linux.

          AFAIK there is no way to get the list of running applications from Air.

          <mx:WindowedApplication xmlns:mx=" http://www.adobe.com/2006/mxml" layout="vertical">
          private function checkBrowser():void {

          // change this according to the OS
          var file:File = File.documentsDirectory.resolvePath("/Applications");
          res.text = "false";
          for each (var o:Object in file.getDirectoryListing()) {
          var name:String = o.nativePath;
          if (name.search(browserName.text) != -1) {
          res.text = "true";
          res.visible = true;
          <mx:Button label="test" click="checkBrowser()"/>
          <mx:TextArea id="browserName" text="Safari"/>
          <mx:Text text="Does this machine have {browserName.text} installed?"/>
          <mx:Text id="res" visible="false"/>