Jump to content

[HELP!] Set the correct Adapter TAP *Solved


DoM1niC
 Share

Recommended Posts

Hey Guys,

Currently I work on a own VPN Launcher over the OpenVPN Client to create a own App like Tunngle / Hamachi

All works great but the TAP-Windows Adapter v9 need to get a low Metric but Autoit couldn't force any admin commands for me. I tried to hack the Registry Entries first but this Method need to disable / enable the Interface as Admin to apply all settings & this method don't work with Win7 in my Tests. 

If someone know how to identify the correct Interface by Description "TAP-Windows Adapter v9" so I could set the correct Metric.

Currently I rename the exist Adapter in the most Ethernet 2 but this is not trust if named the correct Adapter every time on other PCs with more Ethernet Adapters.

Why is this necessary? My VPN needed this low Metric to find the most Local playable Games. Priority musst the highest to make all work fine with Games.

Someone could help me to realize it... THX 

Update:
I found a PowerShell Script to solve my Problem... :) THX

$adapter = gwmi win32_networkadapterconfiguration | ? { $_.IPaddress -like "*10.5*"}
$i = 1
foreach($element in $adapter){
$adapterindex = $element.index
$newname = "PlayHide VPN"
$adapterID = gwmi win32_networkadapter | ?{$_.index -eq $adapterindex}
$adapter = ($adapterID).NetConnectionID
    $input = @"
interface set interface "$adapter" newname="$newname"
exit
"@
$input
$input | netsh
$i++
}

 

Edited by DoM1niC
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...