1.先创建一个文本文档,同时把该文档名称和后缀改为xshell7.bat;
2.打开编辑这个xshell7.bat文件,并且把以下文字复制进去,注意set XSHELL=
这一项需要改成你自己的xshell路径;
@echo off
setlocal EnableDelayedExpansion
color 3e
title Xshell启动器
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c "^&chr(34)^&"%~0"^&chr(34)^&" ::","%cd%","runas",1)(window.close)&&exit
::改成你的xshell启动路径
set XSHELL="D:\Professional_Software\NetSarang\Xshell 7\Xshell.exe"
set cTime=%date:~0,4%-%date:~5,2%-%date:~8,2%
date 2020-12-31
echo ---------------------------------------------------------------
echo Xshell启动器
echo Author : PJW
echo Time : 2022/04/20
echo Ver : V1.0
echo ---------------------------------------------------------------
echo 启动软件中,完成后自动关闭窗口...
start "" %XSHELL%
choice /t 1 /d y /n >nul
date %cTime%
exit
3.改完文件后保存并关闭,然后双击该文件xshell7.bat,此时会弹出cmd框,等其执行完会自己关闭cmd框就可以了;
4.此时xshell就可以打开了,基本原理就是先把电脑系统时间改成以前的时间,启动 xshell 后再把系统时间恢复。