Managing MS Office 2007 Quick Access Toolbar(s) with Roaming Profiles

by Jeremy Saunders on August 4, 2008

Hmmm…why oh why would Microsoft place the Office 2007 Quick Access Toolbar (.qat) files in the “%userprofile%\Local Settings\Application Data\Microsoft\Office” folder rather than the “%appdata%\Microsoft\Office” folder??? The “Local Settings” folder does not roam, nor would you want it to, so I don’t understand their thought process behind this one. The only real workaround is to use logon and logoff scripts to copy them into place. Refer to Microsoft Technet article KB926805 for further information.

Here are the scripts I have successfully used from a Group Policy Object (GPO) that copies these files to and from the users home (H:) drive. I don’t usually usually hard code the homedrive letter in scripts, and would have preffered to have used variables such as %HOMEDRIVE%%HOMEPATH%, but I didn’t have this luxury because it was in a Novell environment, and these variables are not automatically set to the correct places.

LoadQAT.cmd

@echo off
:: This script should be used as a logon script to copy the MS Office 2007 Quick Access Toolbar (.qat)
:: files to the users profile.
:: Access 2007  - Access.qat
:: Excel 2007  - Excel.qat
:: Outlook 2007  - Olkaddritem.qat, Olkapptitem.qat, Olkdistitem.qat, Olklogitem.qat
::    Olkmailitem.qat, Olkpostitem.qat, Olktaskitem.qat
:: PowerPoint 2007 - PowerPoint.qat
:: Word 2007  - Word.qat

:: Written by Jeremy@jhouseconsulting.com on 4th August 2008.

:: Modified by Jeremy@jhouseconsulting.com on 26th August 2008.
:: We needed to use a direct UNC path because the H: drive was not presented in time by the Novell logon script.
:: I also added a loop that to ensure the destination folder exists before the copy takes place.

SetLocal

Echo This is the LoadQAT Logfile for %username% >"%TEMP%\LoadQAT.log"

::IF NOT EXIST H:\NUL GOTO :END
IF NOT EXIST "\\Netncs_flpool01\Flvol01\Users\%username%" GOTO :END

::SET Office2007QuickAccessToolbarLocation=H:\System\MSOfficeQATFiles
SET Office2007QuickAccessToolbarLocation=\\Netncs_flpool01\Flvol01\Users\%username%\System\MSOfficeQATFiles
SET DefaultLocation=%USERPROFILE%\Local Settings\Application Data\Microsoft\Office

IF NOT EXIST "%Office2007QuickAccessToolbarLocation%" MD "%Office2007QuickAccessToolbarLocation%" >>"%TEMP%\LoadQAT.log"

:TestFolder
IF NOT EXIST "%DefaultLocation%" GOTO CreateFolder

xcopy /Y "%Office2007QuickAccessToolbarLocation%\*.qat" "%DefaultLocation%\" >>"%TEMP%\LoadQAT.log"

:END
EndLocal
Exit /b

:CreateFolder
MD "%DefaultLocation%" >>"%TEMP%\LoadQAT.log"
GOTO TestFolder

SaveQAT.cmd

@echo off
:: This script should be used as a logoff script to copy the MS Office 2007 Quick Access Toolbar (.qat)
:: files to the users home drive.
:: Access 2007  - Access.qat
:: Excel 2007  - Excel.qat
:: Outlook 2007  - Olkaddritem.qat, Olkapptitem.qat, Olkdistitem.qat, Olklogitem.qat
::    Olkmailitem.qat, Olkpostitem.qat, Olktaskitem.qat
:: PowerPoint 2007 - PowerPoint.qat
:: Word 2007  - Word.qat

:: Written by Jeremy@jhouseconsulting.com on 4th August 2008.

SetLocal

Echo This is the SaveQAT Logfile for %username% >"%TEMP%\SaveQAT.log"

IF NOT EXIST H:\NUL GOTO :END

SET Office2007QuickAccessToolbarLocation=H:\System\MSOfficeQATFiles
SET DefaultLocation=%USERPROFILE%\Local Settings\Application Data\Microsoft\Office

IF NOT EXIST "%Office2007QuickAccessToolbarLocation%" MD "%Office2007QuickAccessToolbarLocation%" >>"%TEMP%\SaveQAT.log"

xcopy /Y "%DefaultLocation%\*.qat" "%Office2007QuickAccessToolbarLocation%\" >>"%TEMP%\SaveQAT.log"

:END
EndLocal
Exit /b
Jeremy Saunders

Jeremy Saunders

Independent Consultant | Contractor | Microsoft & Citrix Specialist | Desktop Virtualization Specialist at J House Consulting
Jeremy is a highly respected, IT Professional, with over 30 years’ experience in the industry. He is an independent IT consultant providing expertise to enterprise, corporate, higher education and government clients. His skill set, high ethical standards, integrity, morals and attention to detail, coupled with his friendly nature and exceptional design and problem solving skills, makes him one of the most highly respected and sought after Microsoft and Citrix technical resources in Australia. His alignment with industry and vendor best practices puts him amongst the leaders of his field.
Jeremy Saunders
Jeremy Saunders
Jeremy Saunders
  • Galaxiom

    Rather than saving in the user's Home Drive simply use the Group Policy scripts to copy the QAT files to and from the user's permanent Application Data folder where Microsoft should have stored them in the first place.

    Here they are treated as part of their roaming profile.

    I have already posted the simple scripts required.

    http://www.technologyquestions.com/technology/mic

  • jeremy

    Hi Greg,

    I saw your script whilst I was researching the issue. I guess that there were two main reasons why I didn't make use of it.

    1) It would provide two copies…one as part of the roaming profile load and unload, and the other with your scripts. My script only provides the one copy. Therefore, it's more efficient, especially during those heavy logon/logoff periods of the day.

    2) This particular customer has multiple profiles for different application silo's. For the most part we are trying to use a common "Application Data" folder, but a couple of conflicting applications require us to split this off. Once again, my script will centralise the QAT files to be used across all profiles.

    Cheers,

    Jeremy.

  • Hi Jeremy,

    You can also use flex profiles. e.g.

    [IncludeIndividualFolders]

    # Include Office 2007 Quick Access Toolbar shortcuts

    Local SettingsApplication DataMicrosoftOffice

    Cheers,

    Jamie.

  • jeremy

    Indeed you can Jamie, and I do agree that if you are starting out on a fresh deployment, Flex Profiles is the way to go. But whilst it’s a fantastic profile management mechanism, Flex Profiles isn't the solution for every deployment. It requires a lot of work up font, and you need to be confident that the customer has the skills to maintain it moving forward. This particular solution was simply implemented to clean up the mess that another Integrator implemented, something I wrote about here: http://www.jhouseconsulting.com/index.php/jhousec… . There was no time allowed for to revisit and implement Flex Profiles. However, the solution documented above will work in any environment, and requires little profile management skills to implement.

    Cheers,

    Jeremy.

Previous post:

Next post: