Solved

Script that launches firefox and opens URL

Posted on 2011-09-23
4
377 Views
Last Modified: 2012-05-12
I need a script that will open firefox and open a url. I have created a .bat script but the command prompt windows stays open which i cannot have happen.
0
Comment
Question by:zingab
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 47

Expert Comment

by:Martin Liss
ID: 36588743
ShellExecute 0, "open", _
            "C:\Program Files\Mozilla Firefox\Firefox.exe", _
            strMyURL, vbNullString, 1

Open in new window

0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 36588786
In a (dos) batch file you can use 'start' to launch a command and then exit the batch file, like this:

start <path>\firefox.exe "http://www.experts-exchange.com"
exit

Open in new window


Where <path> is where you've got firefox installed.
0
 
LVL 22

Accepted Solution

by:
Paka earned 500 total points
ID: 36588822
Save this to a file named lff.vbs:
----------------
shell """C:\Program Files\Mozilla Firefox\firefox.exe""yoururl.com"

Sub shell(cmd)
  dim objShell
  Set objShell = WScript.CreateObject( "WScript.Shell" )
  objShell.Run(cmd)
  Set objShell = Nothing
end Sub
----------------

You can call this from a batch file using:
"cscript lff.vbs"
0
 

Author Closing Comment

by:zingab
ID: 36589111
Thank you!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question