27 lines
1.2 KiB
Plaintext
27 lines
1.2 KiB
Plaintext
Const HKEY_LOCAL_MACHINE = &H80000002
|
|
|
|
strComputer = "."
|
|
|
|
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
|
|
strComputer & "\root\default:StdRegProv")
|
|
|
|
strKeyPath = "SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}"
|
|
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
|
|
|
|
strValueName = "DriverDesc"
|
|
For Each subkey In arrSubKeys
|
|
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName,strValue
|
|
if strValue = "TAP-Win32 Adapter V9" Then
|
|
strValueName2 = "MTU"
|
|
strValue2 = "1400"
|
|
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName2,strValue2
|
|
|
|
strValueName3 = "NetCfgInstanceId"
|
|
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName3,strValue3
|
|
|
|
strKeyPath2 = "SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002bE10318}\"&strValue3&"\Connection"
|
|
strValueName4 = "Name"
|
|
strValue3 = "LAN-Verbindung OpenVPN"
|
|
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath2,strValueName4,strValue3
|
|
end if
|
|
Next |