neorobin (neorobin)当前离线
技术组成员
:: 涉及到 rasphone.pbk 文件的编码和 find 查找兼容编码的问题, 此工具生成的宽带连接名称不用中文. :: 关于两个键值 DialParamsUID, Guid, 本工具不生成, 代由系统自动生成. :: 打开 ncpa.cpl 刷新查看或 运行 rasdial ... 后, 系统会自动生成相关的键值. :: Guid 的键值也可用 MS 的工具 UUIDGEN 来生成, 下载: http://filediag.com/windows/process/Uuidgen.Exe.html :: PreviewUserPw=1 指定 提示名称, 密码和证书等. @echo off & setlocal enableDelayedExpansion set phoneBook="%AllUsersProfile%\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk" set /a num=0& call :findNum num find "[PPPoE]" !phoneBook!>nul||set "num=" >>!phoneBook! ( echo.&echo [PPPoE!num!] for /f "delims=" %%a in (%~s0) do ( if /i "%%a"==":end:phoneBook" set getValue=N if /i "!getValue!"=="Y" (echo %%a) if /i "%%a"==":phoneBook" set "getValue=Y" ) ) (set vbsfn="%temp%\scuttemp.vbs") >!vbsfn! ( for /f "delims=" %%a in (%~s0) do ( if /i "%%a"==":end:genVbs" set getValue=N if /i "!getValue!"=="Y" (echo %%a) if /i "%%a"==":genVbs" set "getValue=Y" ) ) cscript //nologo !vbsfn! start Control netconnections& rem start ncpa.cpl start rasphone -d PPPoE!num! exit /b :findNum num rem 查找电话本中未用的条目标识数字 find "[PPPoE!%1!]" !phoneBook!>nul||exit /b set /a %1+=1 goto :findNum exit /b :genVbs Set WshShell = Wscript.CreateObject("Wscript.Shell") ' 创建一个快捷方式对象,其在桌面上设置相同的名字 strDesktop = WshShell.SpecialFolders("Desktop") Set oShellLink = WshShell.CreateShortcut(strDesktop & "\\宽带连接!num!.lnk") ' 设置快捷方式的执行路径 oShellLink.TargetPath = "rasphone.exe" oShellLink.Arguments = "-d PPPoE!num!" REM oShellLink.WindowStyle = 1 ' 运行方式 REM oShellLink.Hotkey = "" ' 设置快捷方式的快捷键 oShellLink.IconLocation = "rasphone.exe,0" ' 设置文件夹快捷方式的图标路径 oShellLink.Description = "连接宽带连接 PPPoE!num!" ' 设置快捷方式的描述 oShellLink.WorkingDirectory = "::{7007ACC7-3202-11D1-AAD2-00805FC1270E} :{BA126AD7-2166-11D1-B1D0-00805FC1270E}" ' 起始位置 oShellLink.Save :end:genVbs :phoneBook Encoding=1 Type=5 AutoLogon=0 UseRasCredentials=0 BaseProtocol=1 VpnStrategy=0 ExcludedProtocols=3 LcpExtensions=1 DataEncryption=8 SwCompression=1 NegotiateMultilinkAlways=0 SkipNwcWarning=0 SkipDownLevelDialog=0 SkipDoubleDialDialog=0 DialMode=1 DialPercent=75 DialSeconds=120 HangUpPercent=10 HangUpSeconds=120 OverridePref=15 RedialAttempts=3 RedialSeconds=60 IdleDisconnectSeconds=0 RedialOnLinkFailure=1 CallbackMode=0 CustomDialDll= CustomDialFunc= CustomRasDialDll= AuthenticateServer=0 ShareMsFilePrint=0 BindMsNetClient=0 SharedPhoneNumbers=0 GlobalDeviceSettings=0 PrerequisiteEntry= PrerequisitePbk= PreferredPort= PreferredDevice= PreferredBps=0 PreferredHwFlow=0 PreferredProtocol=0 PreferredCompression=0 PreferredSpeaker=0 PreferredMdmProtocol=0 PreviewUserPw=1 PreviewDomain=0 PreviewPhoneNumber=0 ShowDialingProgress=1 ShowMonitorIconInTaskBar=1 CustomAuthKey=-1 AuthRestrictions=632 TypicalAuth=1 IpPrioritizeRemote=1 IpHeaderCompression=0 IpAddress=0.0.0.0 IpDnsAddress=0.0.0.0 IpDns2Address=0.0.0.0 IpWinsAddress=0.0.0.0 IpWins2Address=0.0.0.0 IpAssign=1 IpNameAssign=1 IpFrameSize=1006 IpDnsFlags=0 IpNBTFlags=0 TcpWindowSize=0 UseFlags=1 IpSecFlags=0 IpDnsSuffix= NETCOMPONENTS= ms_server=0 ms_msclient=0 MEDIA=rastapi Port=PPPoE5-0 Device=WAN 微型端口 (PPPOE) DEVICE=rastapi PhoneNumber= AreaCode= CountryCode=1 CountryID=1 UseDialingRules=0 Comment= LastSelectedPhone=0 PromoteAlternates=0 TryNextAlternateOnFail=1 :end:phoneBook复制代码
kmcc123 当前离线
列兵
TOP
[移动WAP] Encoding=1 Type=1 AutoLogon=0 UseRasCredentials=1 DialParamsUID=1905390 Guid=AC778B0B473E7A4BAC63746F8E26D22F BaseProtocol=1 VpnStrategy=0 ExcludedProtocols=3 LcpExtensions=1 DataEncryption=8 SwCompression=1 NegotiateMultilinkAlways=0 SkipNwcWarning=0 SkipDownLevelDialog=0 SkipDoubleDialDialog=0 DialMode=0 DialPercent=0 DialSeconds=0 HangUpPercent=0 HangUpSeconds=0 OverridePref=15 RedialAttempts=0 RedialSeconds=0 IdleDisconnectSeconds=0 RedialOnLinkFailure=0 CallbackMode=0 CustomDialDll= CustomDialFunc= CustomRasDialDll= AuthenticateServer=0 ShareMsFilePrint=0 BindMsNetClient=0 SharedPhoneNumbers=0 GlobalDeviceSettings=0 PrerequisiteEntry= PrerequisitePbk= PreferredPort=COM5 PreferredDevice=HUAWEI Mobile CMCC Modem PreferredBps=0 PreferredHwFlow=0 PreferredProtocol=0 PreferredCompression=0 PreferredSpeaker=0 PreferredMdmProtocol=0 PreviewUserPw=0 PreviewDomain=0 PreviewPhoneNumber=1 ShowDialingProgress=0 ShowMonitorIconInTaskBar=1 CustomAuthKey=-1 AuthRestrictions=288 TypicalAuth=1 IpPrioritizeRemote=1 IpHeaderCompression=1 IpAddress=0.0.0.0 IpDnsAddress=0.0.0.0 IpDns2Address=0.0.0.0 IpWinsAddress=0.0.0.0 IpWins2Address=0.0.0.0 IpAssign=1 IpNameAssign=1 IpFrameSize=1006 IpDnsFlags=0 IpNBTFlags=1 TcpWindowSize=0 UseFlags=0 IpSecFlags=0 IpDnsSuffix= NETCOMPONENTS= ms_msclient=0 ms_server=0 MEDIA=serial Port=COM5 Device=HUAWEI Mobile CMCC Modem ConnectBPS=7200000 DEVICE=modem PhoneNumber=*98*1# AreaCode= CountryCode=1 CountryID=1 UseDialingRules=0 Comment= LastSelectedPhone=0 PromoteAlternates=0 TryNextAlternateOnFail=1 HwFlowControl=1 Protocol=1 Compression=1 Speaker=1 MdmProtocol=0复制代码
gzdaren 当前离线
rarboy 当前离线
q120072949 当前离线
上等兵
xuwenwen 当前离线
web 当前离线
中尉
zzh197206 当前离线