@echo off
cls
systeminfo | find /i "System Type" | find /i "X86-based PC"
if %errorlevel% == 0 set spth="C:\Program Files\Shoreline Communications\ShoreWare Client\Shoretel.exe"
Echo Checking System Type (x86 vs x64)
systeminfo | find /i "System Type" | find /i "X64-based PC"
if %errorlevel% == 0 set spth="C:\Program Files (x86)\Shoreline Communications\ShoreWare Client\Shoretel.exe"
Echo Checking if Communicator is already installed.....
if exist %spth% goto end1
if NOT exist %spth% goto install
:install
echo Installing Shoretel Communicator
\\cupe-fs-1\apps\ShortelConnect\install-win\GPO\setup.exe /S /v"/qn REBOOT=reallysuppress"
echo Installation Finished
exit
:end1
echo Shoretel Communicator is already installed.
ping 127.0.0.1 -n 5 > nul
exit
答案 0 :(得分:1)
我整理了systeminfo部分,使其更快地运行,以便您可以看到上面我的评论的含义。我还删除了不太可能看到的多余输出。
@echo off
cls
if exist "C:\Program Files\Shoreline Communications\ShoreWare Client\Shoretel.exe" goto end
if exist "C:\Program Files (x86)\Shoreline Communications\ShoreWare Client\Shoretel.exe" goto end
echo Installing Shoretel Communicator
\\cupe-fs-1\apps\ShortelConnect\install-win\GPO\setup.exe /S /v"/qn REBOOT=reallysuppress"
:end