Running a packaged exe in the same folder as the installed firefox extension
        Posted  
        
            by 
                mustafabar
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by mustafabar
        
        
        
        Published on 2011-06-22T23:49:43Z
        Indexed on 
            2011/06/23
            0:22 UTC
        
        
        Read the original article
        Hit count: 218
        
I have read this thread, and some other How to run a local exe in my firefox extension
The problem is, at deployment and using firefox 4.0.1, if I install the .xpi extension, the xpi is put inside the \Profiles...\extensions as **.xpi, which is a compressed format
All the solutions assume that the the extension is put in a folder, thus they are accessing the folder as is, which I cannot do
for example this guy says
//**** get profile folder path ****
  var dsprops = Components.classes['@mozilla.org/file/directory_service;1']
      .getService(Components.interfaces.nsIProperties);
  var ProfilePath = dsprops.get("ProfD", Components.interfaces.nsIFile).path;
//**** initialize file ****
  var file = Components.classes["@mozilla.org/file/local;1"]
      .createInstance(Components.interfaces.nsILocalFile);
  file.initWithPath(ProfilePath);
//**** append each step in the path ****
  file.append("extensions");
  file.append("guid");
  file.append("sample.exe");
guid in my case is installed as {f13b157f-b174-47e7-a34d-4815ddfdfeb8}.xpi which cannot be accessible this way
© Stack Overflow or respective owner