Results 1 to 4 of 4

This is a discussion on Using Chrome to start an external application within the Chrome Talk section, part of the Google Chrome category: Hello all, I have been tasked with finding a way to perform actions thru the browser like starting Notepad. Currently, ...


  1. #1
    ericm76903 is offline Junior Member
    Join Date
    Oct 2009
    Posts
    1

    Default Using Chrome to start an external application

    Hello all,

    I have been tasked with finding a way to perform actions thru the browser like starting Notepad. Currently, ActiveX is used.

    Here is the problem, ActiveX = Microsoft

    Thus, I am searching.

    I have found a starting point for Mozilla, by using XPCOM, and nsIProcess.

    Here is an example:
    Code:
    function Doit(){
      alert('Starting Notepad');
      //Set permissions to allow XPCOM
      netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
      // create an nsILocalFile for the executable
      var file = Components.classes["@mozilla.org/file/local;1"].getService(Components.interfaces.nsILocalFile);
      file.initWithPath("c:\\windows\\NOTEPAD.EXE");
      // create an nsIProcess
      var process = Components.classes["@mozilla.org/process/util;1"].getService(Components.interfaces.nsIProcess);
      process.init(file);
      // Run the process.
      // If first param is true, calling process will be blocked until
      // called process terminates. 
      // Second and third params are used to pass command-line arguments
      // to the process.
      var args = ["c:\\autoexec.bat"];
      process.run(false, args, args.length);
    }
    This functions thru Firefox, but does not thru Chrome.

    I have found that XPCOM is Mozilla only, and the "replacement" is npruntime.

    I would like to be able to offer a solution that is cross-browser compatible, IE: Chrome.

    Thanks,

    Eric

  2. #2
    fxf
    fxf is offline Junior Member
    Join Date
    Oct 2009
    Posts
    5

    Default

    I'd be interested in that capability as well, though I imagine the Chrome/Chromium developers' commitment to building a secure browser would mean that there'd need to be strong sandbox guardbands around what the external application would be permitted to do....

    But right-click (context menu) access from within the browser to the wealth of CLI commands, Java/Perl/awk/etc. scripts, and GUI apps has a real appeal... I'd love to be able to grab the links from my foreground tab and fire off a wget command with a single click.

    Some form of this capability is probably in the minds of the Chrome OS developers, so I'd keep an eye on developments on that front for a possible solution.

  3. #3
    sulasno's Avatar
    sulasno is offline Super Moderator
    Join Date
    Sep 2008
    Location
    Bangkok
    Posts
    1,759

    Default

    isn't wget a tool for downloading ?

  4. #4
    Bloody_Turds is offline Senior Member
    Join Date
    Aug 2009
    Posts
    151

    Default

    I would love to see this happen, particularly for SHORTCUTS..
    I mean, its 1 thing for random sites, but a user usually knows what their putting on their shortcut bar... so bookmarks, and addons should be able to access computer information, just not websites, oh and websites shouldnt be able to add bookmarks

Similar Threads

  1. Where to start.......
    By couponmeup in forum Plugins Development
    Replies: 17
    Last Post: 04-28-2010, 08:30 PM
  2. Enable Extensions - Start Menu and Hyperlinks
    By devilslackey in forum Chrome Tips & Tricks
    Replies: 45
    Last Post: 03-13-2010, 11:40 AM
  3. Chrome doesn't start with administrative privileges (Windows XP)
    By Ivar T in forum Chrome Troubleshooting
    Replies: 2
    Last Post: 08-21-2009, 10:14 PM
  4. Chrome Application Shortcuts - Extensions & User Scripts
    By StevePaul in forum Chrome Tips & Tricks
    Replies: 4
    Last Post: 07-08-2009, 08:25 PM
  5. Chrome can't open ESTA application page
    By seichrome in forum Chrome Talk
    Replies: 0
    Last Post: 02-10-2009, 06:52 AM

Posting Permissions

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