×

判断进程是否存在,系统是否64位,执行对应版本vnc msi安装程序,安装同时设定vnc配置参数

hqy hqy 发表于2022-08-03 08:34:23 浏览543 评论0

抢沙发发表评论

@echo off

mkdir d:\vnc


tasklist /nh|find /i "tvnserver"

if %errorlevel%==0 (

ping -n 2 127.1>d:\vnc\exist

exit 

)else (

goto SETUP

)


:SETUP

ping -n 2 127.1>d:\vnc\setup

for /f "tokens=*" %%i in ('echo %PROCESSOR_ARCHITECTURE%') do (

set vars=%%i

)

echo version:%vars%

if %vars%==AMD64 ( 

ping -n 2 127.1>d:\vnc\none64

copy \\192.168.0.1\用户\tightvnc-2.8.63-gpl-setup-64bit.msi  d:\vnc\  /Y

start msiexec.exe /i d:\vnc\tightvnc-2.8.63-gpl-setup-64bit.msi /quiet /norestart ADDLOCAL=Server SERVER_ADD_FIREWALL_EXCEPTION=1 SET_USEVNCAUTHENTICATION=1 VALUE_OF_USEVNCAUTHENTICATION=1 SET_PASSWORD=1 VALUE_OF_PASSWORD=123456 SET_USECONTROLAUTHENTICATION=1 VALUE_OF_USECONTROLAUTHENTICATION=1 SET_CONTROLPASSWORD=1 VALUE_OF_CONTROLPASSWORD=654321

exit 

) else (

ping -n 2 127.1>d:\vnc\none32

copy \\192.168.0.1\用户\tightvnc-2.8.63-gpl-setup-32bit.msi  d:\vnc\  /Y

start msiexec.exe /i d:\vnc\tightvnc-2.8.63-gpl-setup-32bit.msi /quiet /norestart ADDLOCAL=Server SERVER_ADD_FIREWALL_EXCEPTION=1 SET_USEVNCAUTHENTICATION=1 VALUE_OF_USEVNCAUTHENTICATION=1 SET_PASSWORD=1 VALUE_OF_PASSWORD=123456 SET_USECONTROLAUTHENTICATION=1 VALUE_OF_USECONTROLAUTHENTICATION=1 SET_CONTROLPASSWORD=1 VALUE_OF_CONTROLPASSWORD=654321

exit 

)



打赏

本文链接:https://www.kinber.cn/post/2578.html 转载需授权!

分享到:


推荐本站淘宝优惠价购买喜欢的宝贝:

image.png

 您阅读本篇文章共花了: 

群贤毕至

访客