Box for Office

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search

Box for Office is a plug-in for MS Office 2010 and 2013 to allow users to work directly with files on the Box file synchronization service. It does not require the Box Sync client to be installed.

Download the MSI, the remove-obsolete-client script and the remove-all-clients script and place them all in %SOFTWARE%\box\.

Note that although the client requires the Microsoft .NET Framework version 4.0, the package is written for 4.5. Box says it requires Visual Studio 2010 Tools for Office 10.0.50701 or newer, but in my limited testing it doesn't seem to be necessary to install it explicitly.

Office should be installed before the Box for Office client, but as WPKG doesn't support depending on any one of two packages, this package does not explicitly depend on any Office packages. Consider having your Office package(s) chain this package.

See the client documentation for additional information.

<package
   id="box_for_office"
   name="Box for Office"
   revision="%PKG_VERSION%"
   reboot="false"
   priority="0">

  <!-- N.B. requires removal scripts from
       https://app.box.com/s/9053q4mml05f43y7dwmd
       and
       https://app.box.com/s/4nxq3b94rd6beaag769p -->

  <variable name="PKG_VERSION" value="4.0.820.0" />

  <depends package-id="dotnetfx45" os=".+6\.[0-1]\.\d{4}"/>
  <!-- Apparently also depends on Visual Studio Tools for Office >= 10.0.50701
       (http://go.microsoft.com/fwlink/?LinkId=140384), but in my testing
       things worked fine if I didn't explicitly install it. -->

  <check type="uninstall" path="Box for Office" condition="versiongreaterorequal" value="%PKG_VERSION%" />

  <!-- deal with existing installation -->
  <install cmd='cscript.exe //b "%SOFTWARE%\box\Box for Office 3 removal script.vbs"' >  
    <exit code="any" />
  </install>

  <install cmd='msiexec /qn /i "%SOFTWARE%\box\BoxForOffice.msi"' >
    <exit code="0" />
    <exit code="1638" />
  </install>

  <!-- To disable automatic upgrades (untested!), uncomment these lines: -->
  <!--
  <install cmd="%WINDIR%\system32\reg.exe add "HKLM\Software\Box\Box for Office" /v AutoUpgradesDisabled /t REG_DWORD /d 1 /f" />
  <check type="registry" condition="equals" path="HKLM\Software\Box\Box for Office\AutoUpgradesDisabled" value="1" />
  -->

  <upgrade include="install" />

  <remove cmd='cscript.exe //b "%SOFTWARE%\box\Box for Office removal script.vbs"' >
    <exit code="any" />
  </remove>

</package>