[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Script that launches firefox and opens URL

Posted on 2011-09-23
4
Medium Priority
?
396 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 49

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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

656 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