How to execute shellExecute() method in Mozilla?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rahuljaiswal1987
    New Member
    • Apr 2010
    • 23

    How to execute shellExecute() method in Mozilla?

    How to execute shellExecute() method in Mozilla?

    I am using Firefox/3.6. The above code is not getting invoked. I wanna that is there any need to include something in my code to invoke these components. In my browser these XPComponent are available as i checked using XPComViewer.

    Code:
    var localFile = Components.classes["@mozilla.org/filelocal;1"].createInstance(Components.interfaces.nsILocalFile);
    localFile.initWithPath("C:\Windows\system32\cmd.exe");
    var process = Components.classes["@mozilla.org/processutil;1"].createInstance(Components.interfaces.nsIProcess);
    process.init(localFile);
    var args=null;
    process.run(false, args, args.length);
    Last edited by Niheel; Apr 13 '10, 06:48 AM. Reason: clarify the question
  • PandiarajanChellappan
    New Member
    • Apr 2010
    • 7

    #2
    visit this link, for further reading

    Comment

    • rahuljaiswal1987
      New Member
      • Apr 2010
      • 23

      #3
      Thanks for replying. But this link i hv seen already and according to this we can't do so. But i dont thnk its impossible. It should be possible.

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        Originally posted by rahuljaiswal198 7
        It should be possible.
        it should not. otherwise I’d be very surprised.

        Comment

        Working...