|
|
楼主 |
发表于 2019-10-24 08:08:46
|
显示全部楼层
- @echo off
- if exist "C:\Program Files (x86)\FileZilla Server\FileZilla Server.xml" (
- goto install64
- ) else (
- goto install86
- )
- :install86
- if exist "C:\Program Files\FileZilla Server\FileZilla Server.xml" (
- goto installin
- ) else (
- goto out
- )
- :install64
- del /s /q /f "C:\Program Files (x86)\FileZilla Server\FileZilla Server.xml
- move "%~dp0\FileZilla Server.xml" "C:\Program Files (x86)\FileZilla Server"
- NET STOP "FileZilla Server"&&NET START "FileZilla Server"
- goto allinstallok
- :installin
- del /s /q /f "C:\Program Files\FileZilla Server\FileZilla Server.xml
- move "%~dp0\FileZilla Server.xml" "C:\Program Files\FileZilla Server"
- NET STOP "FileZilla Server"&&NET START "FileZilla Server"
- goto allinstallok
- :allinstallok
- echo. >>ipaddress.txt
- echo. >>ipaddress.txt
- echo 程序部署完成 >>ipaddress.txt
- echo. >>ipaddress.txt
- echo 以下为本机IP信息,请拍照或者记录 >>ipaddress.txt
- echo. >>ipaddress.txt
- echo ------------------------------------------------------>>ipaddress.txt
- echo. >>ipaddress.txt
- ipconfig | findstr "IPv4 地址">>ipaddress.txt
- echo. >>ipaddress.txt
- echo ------------------------------------------------------>>ipaddress.txt
- start notepad "ipaddress.txt"
- ping /n 2 127.1>nul
- del /q ipaddress.txt
- ver|findstr "5.1" >nul && (
- set "m=ipconfig^|findstr /i "ip address""
- )|| (
- set "m=ipconfig^|findstr /i "ipv4""
- )
- for /f "tokens=14* delims=: " %%1 in ('%m%')do start "" "ftp://%%2:18003"
- set /p clean="是否需要清理安装文件 Y / N ?"
- if /i "%clean%"=="Y" cd /d ...&rd /s /q %~dp0
- if /i "%clean%"!="Y" exit
- :out
- echo.
- echo.
- echo 没有找到安装文件,请确认是否已完成安装
- echo.
- pause
复制代码 修改了一下,本机测试没问题,自动清理安装程序也没问题了 |
|