Const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\default:StdRegProv") Set oReg2=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" If oReg2.EnumKey(HKEY_LOCAL_MACHINE,strKeyPath2,arrSubKeys2) <> 0 Then oReg2.CreateKey HKEY_LOCAL_MACHINE,strKeyPath2 oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath2,"PnpInstanceID","ROOT\NET\0000" oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath2,"MediaSubType",1 end if strValueName4 = "Name" strValue3 = "LAN-Verbindung OpenVPN" oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath2,strValueName4,strValue3 end if Next