Created
October 2, 2018 20:47
-
-
Save jkbryan/39130ca5df97b5c9ea380ac8d58315a7 to your computer and use it in GitHub Desktop.
get-vpn-proxy-values.vbs
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
HKEY_CURRENT_USER = &H80000001 | |
strComputer = "." | |
Const ForAppending = 8 | |
strComputer = "." | |
'Setup text file to write results to | |
Set fso = CreateObject("Scripting.FileSystemObject") | |
Set objTextFile = fso.OpenTextFile("C:\temp\proxy.txt",ForAppending, True) | |
dim iValues(1) | |
Set objReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv") | |
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" | |
' | |
ValueName = "DefaultConnectionSettings" | |
objReg.GetBinaryValue HKEY_CURRENT_USER, strKeyPath, ValueName, iValues | |
objTextFile.WriteLine ValueName & ": " & VbCrLf | |
For i = lBound(iValues) to uBound(iValues) | |
objTextFile.Write iValues(i) & "," | |
Next | |
objTextFile.WriteLine VbCrLf & "********************************************************************" | |
' | |
ValueName = "RandomVPN2" | |
objReg.GetBinaryValue HKEY_CURRENT_USER, strKeyPath, ValueName, iValues | |
objTextFile.WriteLine ValueName & ": " & VbCrLf | |
For i = lBound(iValues) to uBound(iValues) | |
objTextFile.Write iValues(i) & "," | |
Next | |
objTextFile.WriteLine VbCrLf & "********************************************************************" | |
' | |
ValueName = "RandomVPN2" | |
objReg.GetBinaryValue HKEY_CURRENT_USER, strKeyPath, ValueName, iValues | |
objTextFile.WriteLine ValueName & ": " & VbCrLf | |
For i = lBound(iValues) to uBound(iValues) | |
objTextFile.Write iValues(i) & "," | |
Next | |
objTextFile.WriteLine VbCrLf & "********************************************************************" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment