Open a URL without using a browser from a batch file

execute url without opening browser
open url in chrome using batch file
batch file to open url with username and password
execute url without opening browser java
how to pass url in batch file
open url from command line windows
batch file to open website
open browser url from cmd

I want to open a particular URL without directly opening the browser using only a batch file. I know I can use something like:

START www.google.com

But I want to open a URL without using a browser. Is this possible?

The reason is that I have to open like 30 URLs, and I don't want the user to have like 30 tabs opened on his/her pc.

If all you want is to request the URL and if it needs to be done from batch file, without anything outside of the OS, this can help you:

@if (@This==@IsBatch) @then
@echo off
rem **** batch zone *********************************************************

    setlocal enableextensions disabledelayedexpansion

    rem The batch file will delegate all the work to the script engine
    if not "%~1"=="" (
        wscript //E:JScript "%~dpnx0" %1
    )

    rem End of batch file area. Ensure the batch file ends execution
    rem before reaching the JavaScript zone
    exit /b

@end


// **** JavaScript zone *****************************************************
// Instantiate the needed component to make URL queries
var http = WScript.CreateObject('Msxml2.XMLHTTP.6.0');

// Retrieve the URL parameter
var url = WScript.Arguments.Item(0)

// Make the request

http.open("GET", url, false);
http.send();

// All done. Exit
WScript.Quit(0);

It is just a hybrid batch/JavaScript file and is saved as callurl.cmd and called as callurl "http://www.google.es". It will do what you ask for. No error check, no post, just a skeleton.

If it is possible to use something outside of the OS, wget or curl are available as Windows executables and are the best options available.

If you are limited by some kind of security policy, you can get the Internet Information Services (IIS) 6.0 Resource Kit Tools. It includes tinyget and wfetch tools that can do what you need.

Execute a URL from a command line without opening a browser in , So I'm putting together a batch file to run at startup that executes a small number of processes, one of them is to execute a reboot of a certain  I want to open a particular URL without opening directly the browser using only a batch file. I know i can use something like: START www.google.com but i want to open a URL without using a browser. Is this possible? The reason is that i have to open like 30 URL's and i don't want the user to have like 30 tabs opened in his pc.

You can use Wget or cURL, see How to download files from command line in Windows like wget or curl.

You will then do e.g.:

wget www.google.com

Open URL in different browser using batch file., To Launch same url in multiple browser then copy below code in notepad and save file as "launch.bat" [crayon-5ef568cd2c640920821358/]  How could i open a specified url using Batch File? Download 100% FREE Office Document APIs for .NET. Open an url in Internet Explorer using batch file [Resolved]

You can use the HH command to open any website.

hh <http://url>

For example,

hh http://shuvankar.com

Though it will not open the website in the browser, but this will open the website in an HTML help window.

Need to run URL without opening browser - Overclock.net, I was able to make a batch file but it would open a browser. Do I need to download some kind of software program to execute a code like this? But I need a URL to run in the background for my security cameras. When you enter the URL, it executes a function on the camera but I need to to happen every 5 minutes. I was able to make a batch file but it would open a browser. Do I need to download some kind of software program to execute a code like this?

Try winhttpjs.bat. It uses a winhttp request object that should be faster than Msxml2.XMLHTTP as there isn't any DOM parsing of the response. It is capable to do requests with body and all HTTP methods.

call winhttpjs.bat  http://somelink.com/something.html -saveTo c:\something.html

[SOLVED] Can you associate a URL to a browser that is not the , Solution: You can create a batch file like this and double click on that (Edit: ninja'​d):"C:\Program to be able to be opened in 2 different browsers without messing with the default browser. If you want a shortcut to open a specific URL in just one browser, you can use the I pin it to my task bar using the instructions found:​  To Launch same url in multiple browser then copy below code in notepad and save file as "launch.bat" [crayon-5ef3c059b38fb616567184/] Double click on launch.bat file. It will open set url in internet explorer,chrome,firefox and in Microsoft EDGE. Let us know if you want more information about batch file commands.

Not sure whether you have already gotten your owner solution. I have been using the following powshell command to achieve it:

powershell.exe -noprofile -command "Invoke-WebRequest -Uri http://your_url"

Q. How can a script open a URL using your default browser?, until I realized that the Start command would open a URL using the default browser. I have scripted OpenURL.bat to open a specified URL in your default  I have a batch file that does a bunch of things and at the end needs to open up a web browser to a page. Is there a way to, in essence, call ShellExecute on a http to open the web page? Windows Command Prompt

Execute a url from a command line without opening a browser in , Execute a url from a command line without opening a browser in windows. uncheck the box Without proxy Using Tor browsers in Windows. exe) or a batch file,  The only caveat, is that if we have a set of pages to open when the new browser window starts up, these will be open too. Solution? Create another batch file to open those intended websites, and use the desktop file icon to open these. THEN change browser's default configuration to not open specific website or home page on start up.

Open URL commands in a batch file causing problems with my URL , If all else fails you may want to try using a url shortener to get a simpler url to use..​. assuming it's a static address or you can automate your own  There are other ways using software. I believe wget will allow you to use http posts and requests better but I haven't use it myself. I'd recommend asking someone in VBScript. I know you can do it with a vb script, and you can always use a batch file to open the .vbs file if you need that.

Create single desktop shortcut to open multiple web pages in , You can create a BAT file to open several URLs or web links at the same time in Well, we have an idea of how to get this done without downloading a new app. If you do not specify the browser, the link will open in your default If you are using Chrome, just create a bookmark folder with all the pages  I have a batch file that launches a browser: @echo off cd C:\\Program Files\\Mozilla Firefox start firefox.exe google.com It runs as expected but returns to the desktop and leaves Firefox on the taskbar.

Comments
  • You can use wget or curl, see superuser.com/questions/25538/…
  • What is your real intention? "Open a URL", to me, means opening a browser page to allow user to browse it.
  • If you don't use a browser then you will not see the www.google.com page. Are you doing something else, like downloading files?
  • possible duplicate of perform httprequest in batch file
  • What do you mean by "open a URL without using a browser"? What should happen? For example, should the corresponding HTML content be saved to disk? If yes, what about other content (images, CSS, JavaScript, etc.)?
  • For one wondering, how does this work, %~dpnx0 specifies the full path to the current file being run, so we're calling into wscript to run this as a JavaScript file via ( //E:engine ), where the chosen engine is JavaScript, and %1 is the first parameter of the batch file, which this is passing forward. Interesting solution.
  • @square_eyes, as indicated, it is passed as argument to the batch file. You can replace all the references to %1 (the first argument to the batch file) with the url you want (don't forget quotes if it contains special characters)
  • @EdsonRodrigues, If you don't want to use the indicated behaviour (the url is given as the argument when calling the batch file) replace in the code %1 (the first argument to the batch file) with the url you want to use (better quote it to avoid problems with special characters).
  • @EdsonRodrigues, try changing the instantiated component. Replace Msxml2.XMLHTTP.6.0 with Msxml2.ServerXMLHTTP.6.0
  • @Sirk, check this. You will not need the quote handling, but the code includes the error handling
  • Somehow the link in your post gets automatically redirected to - superuser.com/questions/25538/…
  • @RBT someone edited that post: superuser.com/posts/25538/revisions
  • wget and curl are not included in stock/vanilla windows, so not always a great option if you're trying to share a quick/easy script with others... step 1: download these other tools and configure them (seems like a big pain for an "easy" script solution).
  • works great to just hit a website to log an IP or kick off a script. Note that (as OP said, ) User does not see the website, and has to close the awkward help popup saying "Page not found".