Tuesday, January 22, 2013

Outlook Fonts using Group Policy Preferences

There are two different tools within Group Policy. To force the user to use a particular font we will add some new registry preferences. To disable Stationery (outlook XP-2007) and Themes (outlook 2007) we can create custom administrative templates.

Preferences:

Group Policy Preferences were introduced into Windows Server 2008 & Vista to allow easier modification of settings that are categorised as preferences, e.g. a users printers or drive mappings. It’s a great way to move away from logon scripts that includes all the functionality of the GPMC. See the image on the left for an example of what can be set through GPPs. For more info on the difference between GP Policy vs. Preference vs. GP preferences check out this TechNet blog. One of the great features is Registry Settings and this is how we achieve our goal.
This will work on Windows XP, 2003, Vista, 2008 and Seven providing the client has the Group Policy Preference Client Side Extensions (CSE) and XMLite installed. Each version of windows can download the CSEs, for its particular OS, through Windows Update or WSUS. XMLite is installed with Internet Explorer 7 or Windows XP SP3 and is included in Vista and above. There are links to all of these files in this Microsoft knowledge base article


Forcing Outlook’s font



To find the correct registry values we need to choose a test machine and configure it how we want.
  • On a test pc with Office 2007 installed
  • Open Outlook
    • Go to Tools > Options > Mail Format > Stationery & Fonts…
    • Use the Font… button to specify the size, type and colour of the font for new messages
    • Use the other Font buttons to specify replies and plain text settings if necessary
    • Click OK and close outlook
  • Open the Group Policy Management Console (Part of RSAT – download here)
  • Create a new Policy and open it in the Group Policy Editor
    • Go to User Configuration > Preferences > Windows Settings > Registry
    • You can either create the new keys yourself or use the much easier Registry Wizard
    • Right Click “Registry” and choose New > Registry Wizard (see Fig. 2)
      • Choose Local Computer
      • Navigte to the following Key
      • HKEY_CURRENT_USERSoftwareMicrosoftOffice12.0CommonMailSettings
      • Tick the values ComposeFontComplex,ComposeFontSimpleReplyFontComplex andReplyFontSimple (see Fig. 3)
      • Click Finish
    • This will now import those settings into the policy. It will create nested folders (known as Collection in the GPE) for each registry key. These “Collections” are purely for administrative ease and can be renamed/moved/deleted as necessary.
  • We also use Office XP (aka 2000) and Office 2003. This involves the same steps as above only the registry keys & values are slightly different
    • Office 2003 Key: HKEY_CURRENT_USERSoftwareMicrosoftOffice11.0CommonMailSettings
    • Office 2003 Values: ComposeFontSimple and ReplyFontSimple
    • Office XP Key: HKEY_CURRENT_USERSoftwareMicrosoftOffice9.0OutlookPreferences
    • Office XP Values: ReplyFont and SendFont
  • That is all that needs to be done.
  • It will take effect the next time a users policy is refreshed and they restart Outlook.
  • Note; This does not prevent a user from changing a font in the email editor or in Outlook’s “options” menu but it will reset the next time the policy is refreshed and Outlook is restarted


Forcing Outlook’s Theme & Stationery



Group Policy Policies use Administrative Templates to provide policies for Windows. You can download the office templates as part of the Office Resource Kit.
Vista & 2008 introduced a more standardised and flexible xml-based template format known as admx files. If you don’t have any of these Operating systems you will need to use the text based adm files. I will show both methods in this article

Creating a custom ADM file for Outlook 2003

  • Open notepad and save the following text as OfficeTweaks.adm
  • CLASS USER
    • CATEGORY !!CustomUserSettings
        CATEGORY !!OutlookVersion
          POLICY !!DisableNewStationery
            EXPLAIN !!DisableNewStationery_Explain
            KEYNAME "SoftwarePoliciesMicrosoftOffice11.0CommonMailSettings"
            VALUENAME "NewStationery"
            VALUEON ""
            VALUEOFF NUMERIC 1
          END POLICY
        END CATEGORY
      END CATEGORY
      [strings]
      CustomUserSettings="Custom User Settings"
      OutlookVersion="Outlook 2003"
      DisableNewStationery="Disable Modify Default Stationery"
      DisableNewStationery_Explain="Enabled – Any Changes made to the user’s Stationery will be ignored by Outlook.  Disabled – No effect. Not Configured – Removes policy."
  • Open the policy you created for the Font Preferences
  • Go to User Configuration > Policies > Administrative Templates
  • Right-click Administrative Templates > Add/Remove Templates…
  • Click on Add and browse to the OfficeTweaks.adm file
  • If there are no errors in the text file it will appear under the Classic Administrative Templates node in the GPE




Creating a custom ADMX file for Outlook 2007



This method uses the wonderful ADMX Editor (aka Migrator) mmc snap-in available here. We could use this to convert the adm above to admx but it doesn’t like the blank ON value. Luckily it is very easy to create an admx from scratch using this tool
  • Open FullArmor ADMX Editor
  • Create a new template e.g. Company Tweaks
  • Create a new category e.g. Office 2007
  • Create a new Policy Setting
    • Display Name: Ignore Legacy Stationery
    • Registry Key: SoftwarePoliciesMicrosoftOffice12.0CommonMailSettings
    • Registry Value Name: NewStationery
    • Class: User
    • Click OK
  • Any further editing is now done in the lower pane of the mmc
  • We now need to set the enabled and disabled values on the “Values” tab
    • Enabled Value
    • Type: Numeric
    • Value: 1
    • Disabled Value
    • Type: Deleted
  • You can also set a description on the “Explain” tab and specify what OS is required in the “Supported On” tab
  • Do the same steps as above to disable Themes but change these settings, the rest is identical.
    • Display Name: Ignore Legacy Themes
    • Registry Value Name: NewTheme
  • When done, right-click the Company Tweaks template node and choose “Save As”
    • This will create the admx file as well as the adml language specific file (defaults to en-us)
    • Make sure you save it in the central ADMX repository so it can be found from any server e.g. \ServerNameSYSVOLDomainPoliciesPolicyDefinitions
  • I have included the XML code below in case you have have any  problems
    • CompanyTweaks.admx

       
         
         
       

       
       
       
         
         
           
         

       

       
         
           
           
         

         
           
           
         

       
    • CompanyTweaks.adml

       
       

       
       

       
         
            Restrict Legacy Stationery
            This policy settings allows you to manage if legacy Stationery is allowed in Outlook 2007 emails.
      If you enable this policy setting, any changes a user makes to their Stationery will be ignored by Outlook.
      If you disable this policy setting, it has no effect
      If you do not configure this policy setting, the restriction will be removed
      See also "Restrict Message Themes" policy

      Restrict Message Themes
      Prevents users from changing the default theme. NOTE: To disable, set to ‘Not Configured’ or move GPO out of scope.
      Enter a command ID to disable:
      Outlook 2007
      Custom User Settings
      ADMX Migrator encountered a string that is not present in the source ADM string table.
      ADMX Migrator encountered a policy that does not have a supportedOn value.
      At least Microsoft Windows Vista
   
   
     
     
   

 










Tuesday, January 8, 2013

Use the Bootrec.exe tool in the Windows Recovery Environment to troubleshoot and repair startup issues in Windows

You can use the Bootrec.exe tool in the Windows Recovery Environment (Windows RE) to troubleshoot and repair the following items in Windows Vista or Windows 7:
  • A master boot record (MBR)
  • A boot sector
  • A Boot Configuration Data (BCD) store
Note When you are troubleshooting startup issues by using the Windows RE, you should first try the Startup Repairoption in the System Recovery Options dialog box. If the Startup Repair option does not resolve the issue, or if you must troubleshoot more steps manually, use the Bootrec.exe tool.

To run the Bootrec.exe tool, you must start Windows RE. To do this, follow these steps:
  1. Put the Windows Vista or Windows 7 installation disc in the disc drive, and then start the computer.
  2. Press a key when you are prompted.
  3. Select a language, a time, a currency, a keyboard or an input method, and then click Next.
  4. Click Repair your computer.
  5. Click the operating system that you want to repair, and then click Next.
  6. In the System Recovery Options dialog box, click Command Prompt.
  7. Type Bootrec.exe, and then press ENTER.
Note To start the computer from the Windows Vista or Windows 7 DVD, the computer must be configured to start from the DVD drive. For more information about how to configure the computer to start from the DVD drive, see the documentation that is included with the computer or contact the computer manufacturer.


To do this, type the following commands at the Windows RE command prompt:
  • bcdedit /export C:\BCD_Backup
  • c:
  • cd boot
  • attrib bcd -s -h -r
  • ren c:\boot\bcd bcd.old
  • bootrec /RebuildBcd

/FixMbr

The /FixMbr option writes a Windows 7 or Windows Vista-compatible MBR to the system partition. This option does not overwrite the existing partition table. Use this option when you must resolve MBR corruption issues, or when you have to remove nonstandard code from the MBR.

/FixBoot

The /FixBoot option writes a new boot sector to the system partition by using a boot sector that is compatible with Windows Vista or Windows 7. Use this option if one of the following conditions is true:
  • The boot sector was replaced with a nonstandard Windows Vista or Windows 7 boot sector.
  • The boot sector is damaged.
  • An earlier Windows operating system was installed after Windows Vista or Windows 7 was installed. In this scenario, the computer starts by using Windows NT Loader (NTLDR) instead of Windows Boot Manager (Bootmgr.exe).

/ScanOs

The /ScanOs option scans all disks for installations that are compatible with Windows Vista or Windows 7. Additionally, this option displays the entries that are currently not in the BCD store. Use this option when there are Windows Vista or Windows 7 installations that the Boot Manager menu does not list.

/RebuildBcd

The /RebuildBcd option scans all disks for installations that are compatible with Windows Vista or Windows 7. Additionally, this option lets you select the installations that you want to add to the BCD store. Use this option when you must completely rebuild the BCD. WAZOO