Wednesday, July 29, 2015

Office shortcut pins migration



For deployments we don't customize the OS all that much, figured Microsoft spends X billions on the trashcan placement on the desktop so why change it up?  For Windows 7 its pretty much just adding Run and Devices and Printers to the Start menu and on 8.1 we remove icons for all the consumer stuff. We are moving our Office suite installset from Windows Installer Package (MSI) to Click-To-Run (C2R), or in other words from Office 2013 to Office 365 ProPlus. 

Even though they "look" the same (till Office 2016 anyhow) and are advertised as such theres alot underneath that is different. Different registry locations, install paths etc. One is related to the Shortcuts. While we do not pin any apps by default, many users are pinning their Office apps to the Taskbar for example. Moving from MSI to C2R changes the source path so the icons cease functioning. So to be nice to our more enlightened customers, our SCCM Admin Cory wrote this quick script to handle the pinnings so they are migrated from O2013 to O365 C2R.


Usage

Capture pinned items with the RECORD switch

 "%WINDIR%\Sysnative\Cscript.exe" PinnedItems.vbs" RECORD  

Uninstall existing office suite. however you want. This was written for O2013 but should work with older versions.
 %SYSTEMDRIVE%\MSOCache\All Users\{90150000-0011-0000-0000-0000000FF1CE}-C\setup.exe /uninstall ProPlus /config Uninstall.XML  

Restore pinned items with the ACTIVESETUP switch.

 "%WINDIR%\Sysnative\Cscript.exe" PinnedItems.vbs" ACTIVESETUP  


How it works

It just inventories all the shortcuts and then stores them in a file.  Then there is an active setup job that runs for every user who logs in to restore them to the new file path of where Office 365 is. Active Setup is very similar to Run and Run Once. It is used when your application requires installation of components such as files or registry keys on a per-user basis, but application has no advertised entry points or other triggers to initiate the installation process.


Download

This script is provided as-is, no warranty is provided or implied.The author is NOT responsible for any damages or data loss that may occur through the use of this script.  Always test, test, test before rolling anything into a production environment.

You can find the download script here.


-Kevin Fason