[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[文件操作] 批处理如何实现输入密码并判断根据正确与否执行不同操作

本帖最后由 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

謝謝大家

謝謝大家 給我的回覆

TOP

我是新手 下次知道了  謝謝!

TOP

返回列表