Search code examples
browserbatch-filefirefox-addonexecute

Execute batch-file from browser


i have got a batch-File. I mostly have to execute it when i'm in my browser (Firefox). So i dont want to go to the directory and execute it. I want to have something in my browser.

First i thought about making a firefox-add-on. Something like a button, which executes my batch-file. But I failed. Then i made a bookmark to the file, but it only shows me the content of the batch-file.

Is there any other option to execute a batch-file from the browser?

EDIT: I have found an add-on that creates an button to execute files:

https://addons.mozilla.org/de/firefox/addon/external-application-button/


Solution

  • I don't know a way you can run this from a browser, but perhaps you don't need to. I'd create a global keyboard shortcut. You haven't mentioned your OS so I've assumed Windows.

    1. Go to your desktop, right-click and select New > Shortcut.

    2. Browse to your .bat file.

    3. Name the shortcut whatever you like - probably best to use yourfile.bat shortcut or similar.

    4. Right-click your newly-created shortcut and select Properties.

    5. On the Shortcut tab, click into the Shortcut key area.

    6. Press Ctrl+Alt+B. I've used B for bat - you can use what you like, although some shortcuts may be used already in your browser - test and adjust if necessary.

    7. Click OK - you're good to go!