之前在运行一些程序的时候需要服务器一直连着,因为程序需要调用鼠标等等。
常见的有按键精灵,注册机,模拟点击 等等等等。
拨号服务器和普通服务器都可以用哦
来介绍一段代码来解决这个问题
代码1
@%windir%\System32\tscon.exe 0 /dest:console
@%windir%\System32\tscon.exe 1 /dest:console
@%windir%\System32\tscon.exe 2 /dest:console
代码2
@%windir%\tscon.exe 0 /dest:console
@%windir%\tscon.exe 1 /dest:console
@%windir%\tscon.exe 2 /dest:console
不同的服务器不同的变量配置,如果代码1不行那么就用代码2,实测很好用。
把代码复制到txt文件中然后改后缀为bat文件。
然后放到桌面双击就可以了 双击后会自动断开连接但是不影响程序调用鼠标。