diff --git a/src/Cedar/CM.c b/src/Cedar/CM.c index d85559ae..01073e22 100644 --- a/src/Cedar/CM.c +++ b/src/Cedar/CM.c @@ -5718,6 +5718,12 @@ void CmMainWindowOnCommandEx(HWND hWnd, WPARAM wParam, LPARAM lParam, bool easy) // Installation is prohibited break; } + // Warning message + if (MsgBox(hWnd, MB_ICONINFORMATION | MB_OKCANCEL, _UU("CM_VLAN_REINSTALL_MSG")) == IDCANCEL) + { + // Cancel + break; + } index = LvGetSelected(hWnd, L_VLAN); if (index != INFINITE) { diff --git a/src/Mayaqua/Microsoft.c b/src/Mayaqua/Microsoft.c index 6d6b9039..02e8945e 100644 --- a/src/Mayaqua/Microsoft.c +++ b/src/Mayaqua/Microsoft.c @@ -8393,6 +8393,76 @@ bool MsUpgradeVLan(char *tag_name, char *connection_tag_name, char *instance_nam return ret; } bool MsUpgradeVLanWithoutLock(char *tag_name, char *connection_tag_name, char *instance_name, MS_DRIVER_VER *ver) +{ + char hwid[MAX_PATH]; + wchar_t hwid_w[MAX_PATH]; + bool ret = false; + UCHAR old_mac_address[6]; + char *s; + // Validate arguments + if (instance_name == NULL || tag_name == NULL || connection_tag_name == NULL || ver == NULL) + { + return false; + } + + if (MsIsNt() == false) + { + // Can not be upgraded in Windows 9x + return false; + } + + if (MsIsInfCatalogRequired()) + { + if (MsIsValidVLanInstanceNameForInfCatalog(instance_name) == false) + { + return false; + } + + StrUpper(instance_name); + } + + Zero(hwid, sizeof(hwid)); + Format(hwid, sizeof(hwid), DRIVER_DEVICE_ID_TAG, instance_name); + StrToUni(hwid_w, sizeof(hwid_w), hwid); + + // Examine whether the virtual LAN card with the specified name has already registered + if (MsIsVLanExists(tag_name, instance_name) == false) + { + // Not registered + return false; + } + + // Get the previous MAC address + s = MsGetMacAddress(tag_name, instance_name); + if (s == NULL) + { + Zero(old_mac_address, 6); + } + else + { + BUF *b; + b = StrToBin(s); + Free(s); + + if (b->Size == 6) + { + Copy(old_mac_address, b->Buf, b->Size); + } + else + { + Zero(old_mac_address, 6); + } + + FreeBuf(b); + } + + ret = MsUninstallVLanWithoutLock(instance_name); + + ret = MsInstallVLanWithoutLock(tag_name, connection_tag_name, instance_name, ver); + + return ret; +} +bool MsUpgradeVLanWithoutLock_old(char *tag_name, char *connection_tag_name, char *instance_name, MS_DRIVER_VER *ver) { wchar_t infpath[MAX_PATH]; char hwid[MAX_PATH]; diff --git a/src/bin/hamcore/strtable_cn.stb b/src/bin/hamcore/strtable_cn.stb index df8212b3..2bdc747c 100644 --- a/src/bin/hamcore/strtable_cn.stb +++ b/src/bin/hamcore/strtable_cn.stb @@ -1004,6 +1004,7 @@ CM_WOULDYOULOAD_IE_PROXY 目前,这台计算机的 Internet Explorer 配置使 CM_MSG_TITLE VPN Server "%S" (虚拟 HUB: "%S") CM_JUMPLIST_RCCONNECT 最近使用的连接设置 CM_VPNGATE_MESSAGE 在 VPN Gate 学术项目网站上有一个公共 VPN 中继服务器列表。\r\n互联网上的任何人都可以建立 VPN 连接至任一列表上的 VPN 服务器。无需用户注册。\r\n\r\nVPN Gate 不是 SoftEther VPN 的一部分。\r\n此图标只提供了一个超链接到 http://www.vpngate.net/。\r\n\r\n安装带有 SoftEther VPN Client 的 VPN Gate Client 插件。它可用简单的配置连接到 VPN Gate 的一个公共 VPN 中继服务器。\r\n\r\n你想访问 http://www.vpngate.net/ (设在日本筑波大学) ? +CM_VLAN_REINSTALL_MSG After reinstalling the driver of the Virtual Network Adapter, the MAC address associated to the current Virtual Network Adapter will change. Also, all TCP/IP settings with the Virtual Network Adapter will reset.\r\n\r\nIn the case that the reinstalled Virtual Network Adapter fails to activate, delete the Virtual Network Adapter once and create it again. If it still does not work properly please create a new Virtual Network Adapter with a different name. # VPN Gate Service diff --git a/src/bin/hamcore/strtable_en.stb b/src/bin/hamcore/strtable_en.stb index d83c5dce..c40a21f7 100644 --- a/src/bin/hamcore/strtable_en.stb +++ b/src/bin/hamcore/strtable_en.stb @@ -995,6 +995,7 @@ CM_WOULDYOULOAD_IE_PROXY Currently the Internet Explorer on this computer is con CM_MSG_TITLE VPN Server "%S" (Virtual Hub: "%S") CM_JUMPLIST_RCCONNECT Recent VPN Servers CM_VPNGATE_MESSAGE There is the list of Public VPN Relay Servers on the VPN Gate Academic Project Web Site.\r\nAnyone on the Internet can connect a VPN connection to any VPN servers on the list.\r\n\r\nVPN Gate Academic Project is not a part of SoftEther VPN.\r\nThis icon provides just a link to http://www.vpngate.net/.\r\nYou need to install VPN Gate Plugin to connect VPN Gate.\r\n\r\nDo you want to visit http://www.vpngate.net/ (provided by University of Tsukuba) ? +CM_VLAN_REINSTALL_MSG After reinstalling the driver of the Virtual Network Adapter, the MAC address associated to the current Virtual Network Adapter will change. Also, all TCP/IP settings with the Virtual Network Adapter will reset.\r\n\r\nIn the case that the reinstalled Virtual Network Adapter fails to activate, delete the Virtual Network Adapter once and create it again. If it still does not work properly please create a new Virtual Network Adapter with a different name. VGC_COLUMN_0 DDNS Hostname diff --git a/src/bin/hamcore/strtable_ja.stb b/src/bin/hamcore/strtable_ja.stb index 3875aaa0..814acfec 100644 --- a/src/bin/hamcore/strtable_ja.stb +++ b/src/bin/hamcore/strtable_ja.stb @@ -998,6 +998,7 @@ CM_WOULDYOULOAD_IE_PROXY 現在、このコンピュータは Internet Explorer CM_MSG_TITLE VPN サーバー "%S" (仮想 HUB: "%S") CM_JUMPLIST_RCCONNECT 最近の接続先 CM_VPNGATE_MESSAGE VPN Gate 学術実験プロジェクトの Web サイトには、公開 VPN 中継サーバーの一覧が公開されています。\r\nこれらの VPN サーバーには、誰でもユーザー登録なしで VPN 接続することができます。\r\n\r\nVPN Gate 学術実験プロジェクトは SoftEther VPN の一部ではありません。\r\nこのアイコンは http://www.vpngate.net/ へのリンクを提供しているに過ぎません。\r\nVPN Gate に接続するためには、VPN Gate Plugin をインストールする必要があります。\r\n\r\nhttp://www.vpngate.net/ (筑波大学における学術実験サイト) を開きますか? +CM_VLAN_REINSTALL_MSG 仮想 LAN カードのドライバを再インストールすると、MAC アドレスが変更になります。また、仮想 LAN カードに関する TCP/IP などのネットワーク設定は初期化されます。続行しますか?\r\n\r\nなお、仮想 LAN カードのドライバを再インストールしても正常に動作しない場合は、新たに別の名前で仮想 LAN カードを作成してください。 # VPN Gate Service 関係