- @echo off
- if exist "C:\Progra~2\FileZilla Server\FileZilla Server.xml" (
- goto install86
- ) else (
- goto install64
- )
- :install86
- del /s /q /f "C:\Progra~2\FileZilla Server\FileZilla Server.xml
- move "%~dp0\FileZilla Server.xml" "C:\Progra~2\FileZilla Server"
- NET STOP "FileZilla Server"&&NET START "FileZilla Server"
- goto allinstallok
- :install64
- if exist "C:\Progra~1\FileZilla Server\FileZilla Server.xml" (
- goto installin
- ) else (
- goto out
- )
- :installin
- del /s /q /f "C:\Progra~1\FileZilla Server\FileZilla Server.xml
- move "%~dp0\FileZilla Server.xml" "C:\Progra~1\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
复制代码 问题1:有的电脑能运行,有的不能运行,直接跳到OUT 提示 没有找到安装文件,请确认是否已完成安装.
问题2:无法删除文件夹本身 |