我有这段代码,我写在一个 .bat 文件中,它运行良好,但是突然......它停止工作了,除了我更改了几个文件夹名称之外,我不知道它发生了什么。
这是我的代码:
@echo off
start /w Files\MySQL\mysql-connector-net-6.6.5.msi
echo MySQL Connector/NET 6.6.5 has been installed.
FOR /F "usebackq delims=" %%i in (`cscript desktop.vbs`) DO SET DESKTOPDIR=%%i
copy Files\DayZAdminApp.exe %DESKTOPDIR%\DayZ Admin Panel
echo.
echo DayZ Admin Panel has been placed onto your desktop.
echo D | xcopy Files\DaRT %desktopdir%\DayZ Admin Panel\Files\DaRT /E /Q
ping 127.0.0.1 -n 2 -w 1000 >nul: 2>nul:
echo.
echo DayZ Admin rCon Tool (DaRT) has been copied.
echo.
copy Files\loadout.exe %DESKTOPDIR%\DayZ Admin Panel\Files
echo Loadout editor has been copied.
echo.
echo.
echo Make sure you keep the folder intact, any missing files will limit the panel's capabilities.
echo.
pause
这是 desktop.vbs 文件:
set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
wscript.echo(strDesktop)`
如果有帮助,这是输出的屏幕截图:
注意:我的代码工作得很好,除了文件夹名称Files\
和DayZ Admin Panel\
如果是我弄乱了那些文件夹名,请告诉我我做错了什么,因为这看起来很漂亮