标题: [系统相关] WIN7下有些命令用不了 [打印本页]
作者: luqgj@126.com 时间: 2013-1-24 22:59 标题: WIN7下有些命令用不了
WIN7下有些命令用不了
我是在XP里定的,可拿回家用WIN7的就出现了几个错了
大家如果是WIN7的系统不防帮我看下
谢谢!- @echo off
- title spring-clover
- color 0a
- mode con: cols=80 lines=22
- setlocal enabledelayedexpansion
- set "t=欢迎使用WIN7无线AP设置程序"
- set "a= 程序制作:聆歌忆往"
- for /l %%a in (1 1 8) do echo.
- for %%a in ("!t!" "!a!" ) do call :string %%a 10 24
- for /l %%a in (1 1 6) do echo.
- echo 启动中,请稍候......
- set/p= =============================================================================<nul
- for /l %%d in (1 1 78) do set /p=<nul
- for /l %%d in (1 1 78) do (set /p=^><nul&call :sleep 10)
- echo.
- :menu
- cls
- for /l %%a in (1 1 9) do echo.
- echo 1.设置WIN7 AP 2.启动WIN7 AP 3.禁用WIN7 AP
- echo.
- echo.
- set "c="
- set/p c=请选择(1-2-3):
- if {!c!}=={1} goto config1
- if {!c!}=={2} goto config2
- if {!c!}=={3} goto config3
- goto error
-
-
- :string
- set "string=%1"
- set t=%2
- set p=%3
- if defined p (for /l %%b in (1 1 %3) do set/p=^ <nul)
- :str
- set word=!string:~0,1!
- set string=!string:~1!
- set /p=!word!<nul&call :sleep !t!
- if defined string goto str
- echo.
- echo.
- echo.
- goto :eof
- :sleep
- set Time1=%time%
- set/a minute1=1%Time1:~3,2%-100
- set/a second1=1%Time1:~6,2%%Time1:~-2%0-100000
- :Loop
- set Time2=%time%
- set/a minute2=1%Time2:~3,2%-100
- set/a second2=1%Time2:~6,2%%Time2:~-2%0-100000
- set/a difMs=((%minute2%-%minute1%+60)%%60)*60000+%second2%-%second1%
- if %difMs% lss %1 goto Loop
- goto :eof
- :config1
- set/p x=请输入AP名称:
- set/p y=请输入AP密码:
- echo 你输入AP名称是!x!,密码是!y!.按任意键程序将进行配置WIN7 AP
- pause>nul
- netsh wlan set hostednetwork ssid=!x!
- netsh wlan set hostednetwork key=!y!
- goto menu
- :config2
- netsh wlan set hostednetwork mode=allow
- netsh wlan start hostednetwork
- goto menu
- :config3
- netsh wlan set hostednetwork mode=disallow
- netsh wlan stop hostednetwork
- goto menu
- :error
- for /l %%a in (1 1 9) do echo.
- echo 你的输入不正确,请重试......
- call :sleep 1000
- goto menu
复制代码
作者: BAT-VBS 时间: 2013-1-24 23:31
报错信息贴出来
作者: luqgj@126.com 时间: 2013-1-26 10:50
算了,我还是换一个方法问吧
在WIN 7下怎么写WIN XP的进度条啊
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |