使用笔记本建立免费无线热点 Create Free Ad-Hoc NetWork

来源:互联网 发布:三星s5网络模式仅限2g 编辑:程序博客网 时间:2024/06/05 11:20


使用笔记本建立免费无线热点 Create Free Ad-Hoc NetWork


秒杀各种“xx度WiFi ”,“xx星随身WIFI”

win7操作系统通过测试,xp不能用


另存脚本为Free_AP.bat

@echo offtitle JJ Wireless Access-Point Assistantver | find " 6." >nulif not %errorlevel%==0 ver | find " 7." >nulIf not %errorlevel%==0 GOTO ErrNotSupportOS:menuSET AP_SSID=%COMPUTERNAME%APSET AP_KEY=%username%1470258369call :test_statusclsecho.echo. Free Wifi Access Pointecho. ======================echo.                                               Ver 1.0, 20150107echo. echo. ** 无线 SSID ** : "%AP_SSID%"echo. ** 密码 Key  ** : "%AP_KEY%"echo. ---------------------------------------------------------------echo. 菜单Menuecho. echo. 1. 启动/停止无线路由 Start/stop service      "%AP_STATUS%"echo. 2. 查看详细信息 Show detailecho. D. 禁用无线路由 Disableecho. echo. Q. 退出Quitecho.echo. 请输入菜单号码, 如果不知道要做什么, 输入数字 1 就好 :-)echo. Please select your menu:set userselect=set /P userselect=:^>if ["%userselect%"]==["1"] call :startstop_svcif ["%userselect%"]==["2"] call :show_detailif ["%userselect%"]==["D"] call :disable_apif ["%userselect%"]==["d"] call :disable_apif ["%userselect%"]==["Q"] goto :quitif ["%userselect%"]==["q"] goto :quitecho.echo.echo.goto :menu:initcall :call_wlan_cmd set hostednetwork mode=allow ssid=%AP_SSID% key=%AP_KEY%goto :eof:startstop_svcecho.call :test_statusif ["%AP_STATUS%"]==[""] call :initif ["%AP_STATUS%"]==["Not available"] call :initnetsh wlan show hostednetwork|find "Status                 :"|find "Not started" >nulif %errorlevel%==0 (  call :call_wlan_cmd start hostednetwork) else (  call :call_wlan_cmd stop hostednetwork)pausegoto :eof:test_statusset AP_STATUS=for /F "tokens=1,2 delims=:" %%s in ( 'netsh wlan show hostednetwork ^| find "Status                 :"') do set AP_STATUS=%%tSET AP_STATUS=%AP_STATUS:~1%goto :eof:call_wlan_cmdnetsh wlan %*if not "%errorlevel%" == "0" (  echo. 发生错误 Error Found  echo. 需要一个有管理员权限的帐户登陆系统,且用鼠标右键点“以系统管理员身份”运行  echo. You must run this command from a command prompt with administrator privilege.  echo.)goto :eof:disable_apcall :call_wlan_cmd set hostednetwork mode=disallowgoto :eof:show_detailcall :call_wlan_cmd show hostednetworkpausegoto :eof:ErrNotSupportOSecho. Error:echo.   Only Win7 is supported!echo.pausegoto :eof:quit



0 0
原创粉丝点击