
批處理輸入特殊字符goto異常問題出在哪里新人報到,請各位大神多指教問題出在哪里
上面測試內(nèi)容,當輸入特殊的字符特殊符號如“*”、“.”、“/”等,都會自動goto :START,請大神們指正下,小白不勝感激!!!nclick="copycode($('code0'));">復制代碼
- @echo off
- :MENU
- cls
- color 0a
- set Status=
- type C:UsersasusDesktopOntune_Check.txt | findstr 陳寶寶 > null && set Status=ontune Sms Is Open || set Status=ontune Sms Is Stop
- echo.%Status%
- echo.=-=-=-=-=-Action Options-=-=-=-=-=
- echo.++
- echo.+ 1.ontune Sms Start +
- echo.++
- echo.+ 2.ontune Sms Stop+
- echo.++
- echo.+ 3.Exit +
- echo.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==
- echo.
- set /p id=Please Enter Options:
- if %id%==1 ( goto START ) else ( if %id%==2 ( goto STOP ) else ( if %id%==3 ( goto EXIT ) else (if %id% == 0 (echo You entered the wrong option please re-enter!!! & pause > null & goto MENU) else (if %id% gtr 4 (echo You entered the wrong option please re-enter!!! & pause> null & goto MENU) else (if %id% equ (echo You entered the wrong option please re-enter!!! & pause > null & goto MENU))))))
- :START
- copy C:UsersasusDesktopOntune_Check1.txt C:UsersasusDesktopOntune_Check.txt
- net stop QQMicroGameBoxService
- net start QQMicroGameBoxService
- echo.=-=-=-=-==-=-==-==-=-=-=-=-=-=
- echo.ontune Sms Is Open
- echo.=-=-=-=-==-=-==-==-=-=-=-=-=-=
- echo Press any key to exit & pause > null
- exit
- :STOP
- copy C:UsersasusDesktopOntune_Check2.txt C:UsersasusDesktopOntune_Check.txt
- net stop QQMicroGameBoxService
- net start QQMicroGameBoxService
- echo.=-=-=-=-==-=-==-==-=-=-=-=-=-=
- echo.ontune Sms Is Stop
- echo.=-=-=-=-==-=-==-==-=-=-=-=-=-=
- echo Press any key to exit & pause > null
- exit
- :EXIT
- exit

