@echo off set EXE_NAME=zerotier-one_x64.exe set MOONS_DIR=C:\ProgramData\ZeroTier\One\moons.d set MOON_FILE=00000085dd33b781.moon set DRIVE_NAME=Z: set DRIVE_PATH=\\10.244.240.49\sese set USERNAME=1 set PASSWORD= echo Installing %EXE_NAME%... start /wait %EXE_NAME% /S echo Creating %MOONS_DIR% directory... mkdir %MOONS_DIR% echo Copying %MOON_FILE% to %MOONS_DIR%... copy "%~dp0%MOON_FILE%" "%MOONS_DIR%" echo Restarting ZeroTier One service... net stop zerotier-one net start zerotier-one echo Mapping %DRIVE_PATH% to %DRIVE_NAME%... net use %DRIVE_NAME% %DRIVE_PATH% /user:%USERNAME% %PASSWORD%
时间: 2024-03-18 11:45:09 浏览: 58
K-Means聚类make_moons数据
好的,以下是修改后的脚本,你可以测试一下:
@echo off
set EXE_NAME=zerotier-one_x64.exe
set MOONS_DIR=C:\ProgramData\ZeroTier\One\moons.d
set MOON_FILE=00000085dd33b781.moon
set DRIVE_NAME=Z:
set DRIVE_PATH=\\10.244.240.49\sese
set USERNAME=1
set PASSWORD=
echo Installing %EXE_NAME%...
start /wait %EXE_NAME% /S
echo Creating %MOONS_DIR% directory...
mkdir %MOONS_DIR%
echo Copying %MOON_FILE% to %MOONS_DIR%...
copy "%~dp0%MOON_FILE%" "%MOONS_DIR%"
echo Restarting ZeroTier One service...
net stop zerotier-one
net start zerotier-one
echo Please ask the server owner for remote access permission, enter ok after you get the permission
set /p permission=
if "%permission%"=="ok" (
echo Mapping %DRIVE_PATH% to %DRIVE_NAME%...
net use %DRIVE_NAME% %DRIVE_PATH% /user:%USERNAME% %PASSWORD%
) else (
echo Cannot map network drive without permission
)
阅读全文