Hi, > +// stripped version of ExecCommand in interactive.c static DWORD
C++ style comment. > + // rename adapter via netsh call C++ style comment. > + const TCHAR* szFmt = _T("netsh interface set interface name=\"%s\" > newname=\"%s\""); > + size_t ncmdline = _tcslen(szFmt) + _tcslen(szOldName) + > _tcslen(szName) + 1; > + WCHAR* szCmdLine = malloc(ncmdline * sizeof(TCHAR)); > + _stprintf_s(szCmdLine, ncmdline, szFmt, szOldName, szName); For the record: 1. `netsh interface set interface` does not accept adapter index. Therefore, the interface to rename must be selected by name. I'd prefer more explicit selection like adapter GUID or interface index, but selecting by name seems the only way here. Interface indexes are a thing of the TCP/IP, so it kind of makes sense lower layers are not operating with them. Ack. 2. I've tested `netsh interface set interface` to ignore case when selecting adapter. Ack. 3. I've tested `netsh interface set interface` to work when renaming adapter back to the original name. Ack. Reviewed the code, compiled, debugged, tested. Acked-by: Simon Rozman <si...@rozman.si> Regards, Simon _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel