回复 8# Batcher
我完整运行了一遍:
Microsoft Windows [版本 10.0.16299.15]
(c) 2017 Microsoft Corporation。保留所有权利。
C:\Users\holypressure>D:\#Important重要\#CSDN更新!!!\hosts写入、端口占用\2未加入的功能\#测试用.bat
C:\Users\holypressure>TITLE hosts写入、端口占用
C:\Users\holypressure>color 17
C:\Users\holypressure>set choice=请输入命令并回车,从头开始按"r",退出按"q",重启系统按"s":
C:\Users\holypressure>echo.
C:\Users\holypressure>echo 欢迎使用hosts写入、端口占用
欢迎使用hosts写入、端口占用
C:\Users\holypressure>echo.
C:\Users\holypressure>echo 如果执行失败请右键管理员打开
如果执行失败请右键管理员打开
C:\Users\holypressure>echo.
C:\Users\holypressure>echo. ====== https://steamcn.com/t461062-1-1 ======
====== https://steamcn.com/t461062-1-1 ======
C:\Users\holypressure>echo. 命令1: 查看端口占用(非系统进程(PID=4)请使用任务管理器关闭或"taskkill /pid 对应PID -t -f")
命令1: 查看端口占用(非系统进程(PID=4)请使用任务管理器关闭或"taskkill /pid 对应PID -t -f")
C:\Users\holypressure>echo. 命令2:hosts写入问题及刷新DNS缓存(如果hosts写入失败有可能是安全软件自动阻止)
命令2:hosts写入问题及刷新DNS缓存(如果hosts写入失败有可能是安全软件自动阻止)
C:\Users\holypressure>echo. 命令3:VMware虚拟机服务的vmware-hostd.exe等自动启动和停止(443端口)
命令3:VMware虚拟机服务的vmware-hostd.exe等自动启动和停止(443端口)
C:\Users\holypressure>echo. 命令4: 解决端口被一些system服务占用
命令4: 解决端口被一些system服务占用
C:\Users\holypressure>echo. 命令5:查看本地网络配置
命令5:查看本地网络配置
C:\Users\holypressure>echo. 命令6:打开steam控制台/开发者模式
命令6:打开steam控制台/开发者模式
C:\Users\holypressure>echo. =============================================
=============================================
C:\Users\holypressure>echo 请输入命令并回车,从头开始按"r",退出按"q",重启系统按"s":
请输入命令并回车,从头开始按"r",退出按"q",重启系统按"s":
C:\Users\holypressure>echo.
C:\Users\holypressure>choice /c 12345rsq
[1,2,3,4,5,R,S,Q]?Q
C:\Users\holypressure>if 8 == 8 (goto :end )
C:\Users\holypressure>echo.
C:\Users\holypressure>echo.
C:\Users\holypressure>echo 是否打开steamcommunity_302.exe?
是否打开steamcommunity_302.exe?
C:\Users\holypressure>echo 请选择您的版本
请选择您的版本
C:\Users\holypressure>echo (1:V9.5 2:V9.4 3:V9.3 q:退出)
(1:V9.5 2:V9.4 3:V9.3 q:退出)
C:\Users\holypressure>echo.
C:\Users\holypressure>choice /c 123q
[1,2,3,Q]?1
C:\Users\holypressure>if 1 == 4 (goto :no )
C:\Users\holypressure>if 1 == 3 (goto :v9.3 )
C:\Users\holypressure>if 1 == 2 (goto :v9.4 )
C:\Users\holypressure>if 1 == 1 (goto :v9.5 )
C:\Users\holypressure>If exist "D:\#Important重要\#CSDN更新!!!\hosts写入、端口占用超级整合版\2未加入的功能\S_302_V9.5.lnk" (Start "" "D:\#Important重要\#CSDN更新!!!\hosts写入、端口占 用超级整合版\2未加入的功能\S_302_V9.5.lnk" & goto no ) else (Goto second )
C:\Users\holypressure>If exist "D:\#Important重要\#CSDN更新!!!\hosts写入、端口占用超级整合版\2未加入的功能\steamcommunity_302_V9.5.exe" (Start "D:\#Important重要\#CSDN更新!!!\hosts写 入、端口占用超级整合版\2未加入的功能\steamcommunity_302_V9.5.exe" & goto no ) else (Goto thrid )
C:\Users\holypressure>If exist "D:\#Important重要\#CSDN更新!!!\hosts写入、端口占用超级整合版\2未加入的功能\steamcommunity_302_V9.5.lnk" (Start "" "D:\#Important重要\#CSDN更新!!!\hosts写入、端口占用超级整合版\2未加入的功能\steamcommunity_302_V9.5.lnk" & goto no ) else (Goto forth )
C:\Users\holypressure>If exist "D:\#Important重要\#CSDN更新!!!\hosts写入、端口占用超级整合版\2未加入的功能\steamcommunity_302_V9.5.exe - 快捷方式.lnk" (Start "" "D:\#Important重要\#CSDN 更新!!!\hosts写入、端口占用超级整合版\2未加入的功能\steamcommunity_302_V9.5.exe - 快捷方式.lnk" & goto no ) else (echo 首次启动会创建快捷方式 & Goto find )
首次启动会创建快捷方式
C:\Users\holypressure>set "FileName=steamcommunity_302_V9.5.exe"
C:\Users\holypressure>echo 正在搜索,请稍后...
正在搜索,请稍后...
C:\Users\holypressure>for %a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (if exist %a:\ (
pushd %a:\
for /R %b in (*steamcommunity_302_V9.5.exe) do (if /I "%~nxb" EQU "steamcommunity_302_V9.5.exe" (
echo,%b
set way=%b
goto :deal
) )
popd
) )
C:\Users\holypressure>(if exist C:\ (
pushd C:\
for /R %b in (*steamcommunity_302_V9.5.exe) do (if /I "%~nxb" EQU "steamcommunity_302_V9.5.exe" (
echo,%b
set way=%b
goto :deal
) )
popd
) )
C:\>(if /I "steamcommunity_302_V9.5.exe" EQU "steamcommunity_302_V9.5.exe" (
echo,C:\Users\holypressure\Downloads\steamcommunity_302_V9.5\steamcommunity_302_V9.5.exe
set way=C:\Users\holypressure\Downloads\steamcommunity_302_V9.5\steamcommunity_302_V9.5.exe
goto :deal
) )
C:\Users\holypressure\Downloads\steamcommunity_302_V9.5\steamcommunity_302_V9.5.exe
C:\>set Program=C:\Users\holypressure\Downloads\steamcommunity_302_V9.5\steamcommunity_302_V9.5.exe
C:\>set LnkName=S_302_V9.5
C:\>set WorkDir=
C:\>set Desc=steamcommunity_302.exe
C:\>if not defined WorkDir call:GetWorkDir "C:\Users\holypressure\Downloads\steamcommunity_302_V9.5\steamcommunity_302_V9.5.exe"
C:\>set WorkDir=C:\Users\holypressure\Downloads\steamcommunity_302_V9.5\
C:\>set WorkDir=C:\Users\holypressure\Downloads\steamcommunity_302_V9.5
C:\>goto :eof
C:\>(
echo Set WshShell=CreateObject("WScript.Shell")
echo strDesKtop=WshShell.SpecialFolders("DesKtop")
echo Set oShellLink=WshShell.CreateShortcut(strDesKtop&"\S_302_V9.5.lnk")
echo oShellLink.TargetPath="C:\Users\holypressure\Downloads\steamcommunity_302_V9.5\steamcommunity_302_V9.5.exe"
echo oShellLink.WorkingDirectory="C:\Users\holypressure\Downloads\steamcommunity_302_V9.5"
echo oShellLink.WindowStyle=1
echo oShellLink.Description="steamcommunity_302.exe"
echo oShellLink.Save
) 1>makelnk.vbs
C:\>echo 桌面快捷方式创建成功!
桌面快捷方式创建成功!
C:\>cscript //nologo makelnk.vbs
C:\>del /f /q makelnk.vbs
C:\>goto pen
C:\>if exist "C:\Users\holypressure\desktop\S_302_V9.5.lnk" (
xcopy /y /c /h /r "C:\Users\holypressure\desktop\S_302_V9.5.lnk" "D:\#Important重要\#CSDN更新!!!\hosts写入、端口占用超级整合版\2未加入的功能\"
del /q /f "C:\Users\holypressure\desktop\S_302_V9.5.lnk"
start "" "D:\#Important重要\#CSDN更新!!!\hosts写入、端口占用超级整合版\2未加入的功能\S_302_V9.5.lnk"
) else (echo 失败 )
C:\Users\holypressure\desktop\S_302_V9.5.lnk
复制了 1 个文件
C:\>goto :no
C:\>pause
请按任意键继续. . . |