Wednesday, December 12, 2012

Silent Install Of Shoretel Communicator without Reboot

Here's how to install Shoretel Communicator 12.3 silently, remotely, and without an automatic reboot.

Download the communicator install from your HQ server.

Please note that Communicator will not work properly until the PC has been restarted. I'll have to check into that later I assume it just needs a service restarted.

Here's the entire script I wrote up.
1. We do a check to see if it's a x86 or x64 PC, we get that from the SystemInfo command.
2. Then we set the appropriate path using the variable spth.
  
DO NOT USE THE WORD "PATH" AS YOUR VARIABLE NAME
It's a bad idea and it will end badly for you. I ALMOST made that mistake, but I have the good habit of re-reading a script one more time before I execute it. Saved my bacon.

3. Determines if Communicator is already installed, then either forks it to the install section or the end function.

The install command line to get a silent non rebooted install of communicator is as follows:

setup.exe /S /v"/qn REBOOT=reallysuppress"

now it's an installshield that's wrapped around an MSI so the switches are split.
/S and /v are for the installshield setup. /S is Silent /v is variable to pass to the msi installer.
You can pass multiple variables / switches to the MSI by enclosing them in " ". Notice there is no space between the /v and the ". Spaces inside the " " are okay.

Here's the script:

@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
\\fileserver\installs$\ShoreTel\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

Psexec or use your favorite method of pushing out an install and you're golden.

5 comments:

  1. Thanks for this article, it definitely came in handy tonight. You may want to fix the typo in the command as it should have two P's in "ReallySuppress". Otherwise this worked great. It would be nice to be able to configure some of the settings in advance, but sounds like that information hasn't been added to the MSI yet.

    ReplyDelete
  2. I have another one that will work for upgrades with a version check:

    Rem ** Change the following 3 "Set" lines to appropriate define the location of both the setup files and version information.
    Rem **
    Set Version=ShoreTel_19_43_7902_0.ver
    Set Dir=\\path to installer
    Set MSI=setup.exe /S /v"/qn REBOOT=reallysuppress"

    Rem *********************************************************************************************

    Set Voip=0
    if exist "%ProgramFiles(x86)%\Shoreline Communications\ShoreWare Client\ShoreTel.exe" (Set VoipPath="%ProgramFiles(x86)%\Shoreline Communications\ShoreWare Client")
    if exist "%ProgramFiles%\Shoreline Communications\ShoreWare Client\ShoreTel.exe" (Set VoipPath="%ProgramFiles%\Shoreline Communications\ShoreWare Client")


    :CHECKVERSION
    if not exist %VoipPath%\%Version% (goto UPDATE) else (goto EXIT)


    :UPDATE
    Rem ** This procedure will actually launch the ShoreTel Communicator MSI.
    Rem ** It will then copy the version file so we know not to attempt an
    Rem ** upgrade to this version again.
    call %Dir%\%MSI%
    copy %Dir%\%Version% %VoipPath%
    goto :EXIT


    :EXIT
    Rem ** Do Nothing. The ShoreTel Communicator software is up to date.
    @echo on

    ReplyDelete
  3. The absolute best silent install script out there to date. I'm looking to deploy this via GPO and across multiple Outlook platforms. Do you know if there are any other /v switches that will suppress all Outlook integrations/add-ons?

    ReplyDelete
    Replies
    1. Not that I am aware of. I believe those install on a per user basis when outlook and shortel are opened.

      Delete

All comments moderated.
Comments like "sweet dude" or "this is awesome" or "thanks" will be denied,
if you've got something genuinely interesting to say, say it. Other than that just sit back and bask in the glory.