set fso = CreateObject("Scripting.FileSystemObject")
hostExe = fso.GetFileName(WScript.FullName)

if hostExe = "WScript.exe" then
	msgbox "GUI"
elseif hostExe = "cscript.exe" then
	WScript.echo "CLI"
end if

addressURL = "https://www.mcholewa.us.edu.pl/database/temperatures.txt"

Set res = CreateObject("Msxml2.XMLHttp.6.0")
call res.open("GET", addressURL, False)
call res.send()

If res.Status = 200 Then
	if hostExe = "WScript.exe" then
		msgbox res.responseText
	elseif hostExe = "cscript.exe" then
		WScript.echo res.responseText
	end if
elseif res.Status = 404 then
	WScript.echo "[-1][0][Plik nie istnieje.]"
End If