- 帖子
- 6
- 积分
- 182
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2008-11-7
|
[文件操作] 批处理如何实现输入密码并判断根据正确与否执行不同操作
本帖最后由 pcl_test 于 2016-11-1 22:05 编辑
遊戲加鎖
我想做一個批處理文件來把遊戲加鎖 以下是我寫的代碼 請大將幫我看看哪錯了
@echo off
:main
set /p pwd=[请输入密码]
if /i "%pwd%"=="nul" goto :运行
goto :second chance
:运行
echo 密码输入正确。
@echo You got 30 min after you run this program
pause
@taskkill /im Skype.exe /f /t (加速我的遊戲)
@taskkill /im skypePM.exe /f /t
@taskkill /im iTunesHelper.exe /f /t
@taskkill /im googleupdate.exe /f /t
@taskkill /im sansaupdater.exe /f /t
@taskkill /im xdict.exe /f /t
@taskkill /im iPodService.exe /f /t
@taskkill /im pcsuite.exe /f /t
@taskkill /im stmgr.exe /f /t
@taskkill /im iexplore.exe /f /t
@taskkill /im msnmsgr.exe /f /t
@taskkill /im explorer.exe /f /t
@taskkill /im qq.exe /f /t
goto :game
:second chance
@echo 剩餘機會 (1)
set /p pwd=[请输入密码]
if /i "%pwd%"=="nul" goto :运行
goto :third chance
:third chance
@echo 剩餘機會 (0)
set /p pwd=[请输入密码]
if /i "%pwd%"=="nul" goto :运行
exit
:game
I:\CS1.6\cstrike.exe
@ping n 20 127.1>nul
@start explorer.exe
@taskkill /im cstrike.exe /f /t
@echo Thanks for useing
@echo Bye Bye
@logoff |
|