Skip to content

Instantly share code, notes, and snippets.

@tnhung2011
Last active December 24, 2025 07:53
Show Gist options
  • Select an option

  • Save tnhung2011/d6ef25adb0e046e3af45afa9880bac7e to your computer and use it in GitHub Desktop.

Select an option

Save tnhung2011/d6ef25adb0e046e3af45afa9880bac7e to your computer and use it in GitHub Desktop.
Displays http://example.com using cURL and MSHTA (no temporary file)
@echo off
setlocal enableextensions
:: curl should be available by default in Windows 10 Insider build 17063 and later
:: Source: https://devblogs.microsoft.com/commandline/tar-and-curl-come-to-windows/
for /f "tokens=*" %%a in ('curl -s -L http://example.com') do (
echo(%%a
set "str=%%a"
)
mshta "about:%str:"=""%"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment