Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    document path on local machine

    I am writing a firefox extension.

    I have a js file embedded into additional files to make up the extension.

    I want to run a single executable file, but I can't figure out what the relative path is. The path must remain relative, because the user will set the directory.

    The js code like so:

    runthefile: function(){

    const path = "calc.exe"

    var file = Components
    .classes["@mozilla.org/file/local;1"]
    .createInstance(Components.interfaces.nsILocalFile)

    file.initWithPath(path)
    file.launch()
    }


    However, it doesn't seem to run calc.exe no matter where I put it.

    I've also tried /calc.exe, \calc.exe, ./calc.exe, and .\calc.exe with no success.

    I have also embedded calc.exe at every directory level, still nothing.
    Last edited by lucidlogic; 07-30-2006 at 08:19 PM.

  • #2
    New to the CF scene
    Join Date
    Jul 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    nobody knows the answer to such a simple question? Pathetic.

  • #3
    Senior Coder
    Join Date
    Feb 2006
    Location
    USA
    Posts
    1,013
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It may be a simple question, but it requires highly specialized knowledge that not many people have.

    Try asking in the Mozillazine Extension Development Forum.
    Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions
    Java != JavaScript && JScript != JavaScript
    Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •