Created
February 12, 2016 18:52
-
-
Save josy1024/3eeb165ed5eacad0e771 to your computer and use it in GitHub Desktop.
relaxed universal logging script windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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