Skip to content

Instantly share code, notes, and snippets.

@josy1024
Created February 12, 2016 18:52
Show Gist options
  • Save josy1024/3eeb165ed5eacad0e771 to your computer and use it in GitHub Desktop.
Save josy1024/3eeb165ed5eacad0e771 to your computer and use it in GitHub Desktop.
relaxed universal logging script windows
Set WshShell = Wscript.CreateObject("Wscript.Shell")
set env = WshShell.Environment("PROCESS")
code = WScript.Arguments(0)
id = ENV ("COMPUTERNAME") & "_" & ENV ("USERNAME")
call logme( code, id)
function logme (code, id)
url = "https://logurl.domain.com/api/rw/l.php?code=" & code & "&uid=" & id
prog = """C:\ProgramData\wget.exe"" --no-check-certificate --http-user=httpuser --http-password=httppass --no-check-certificate --timeout=7 --tries=2 --delete-after """ & url & """"
wscript.echo prog
WshShell.Run prog, 0, False
'wscript.echo prog
end function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment