0
試圖製作一個簡單的開關BATCH是否使用.dll。這裏是代碼:它似乎什麼都不做,但我找不到任何錯誤。幫幫我?爲什麼不用這個簡單的批處理腳本工作?
:StartProgram @echo off set /p UsePowerup= Would you like to use power up plug in (1=Yes;2=No;3=Exit)? If %UsePowerup%=3 ( EXIT ) Else IF %UsePowerup%=2 ( CD C:\Program Files (x86)\Steam\SteamApps\common\Fallout New Vegas\Data\NVSE\Plugins\ If EXIST geckpu-nv-14.dll ( ECHO "Moving Power Up Plugin to Desktop" MOVE geckpu-nv-14.dll C:\Users\Anonymous\Desktop\ ECHO "Move Power Up Plugin to Desktop SUCCESS" PAUSE GOTO RunGECK ) Else ( ECHO "Plug-in not found! Try again." PAUSE GOTO StartProgram ) ) Else IF %UsePowerup%=1 ( cd C:\Users\Anonymous\Desktop\ If EXIST geckpu-nv-14.dll ( ECHO "Moving Power Up Plugin to GECK" MOVE geckpu-nv-14.dll C:\Program Files (x86)\Steam\SteamApps\common\Fallout New Vegas\Data\NVSE\Plugins\ ECHO "Move Power Up Plugin to Desktop SUCCESS" PAUSE GOTO RunGECK ) Else ( ECHO "Plug-in not found! Try again." PAUSE GOTO StartProgram ) ) Else ECHO "INVALID CHOICE Try Again" ( PAUSE CLS GOTO StartProgram ) :RunGECK cd C:\Program Files (x86)\Steam\SteamApps\common\Fallout New Vegas\ nvse_loader -editor exit
謝謝你們
你是什麼意思「無所事事」?我看到的一個簡單錯誤是,選項'1'('C:\ Program Files ...')下的'MOVE'命令中的第二個參數應該有引號。 – mbroshi
打開的括號''('必須和要被正確解析的語句在同一行上,命令行解析器不會向前看,因此它會停止執行,因爲它看到不完整的if語句。不正確,比較需要雙'=='標誌。 –