Programmatically Adding Windows Start Tiles

Windows 8.1 (like Windows 8) uses the Metro styled Start Screen.  Programmatically adding to the screen has proved to be a real problem for organisations that have adopted for an early move to the new operating systems.

With Windows 7 the start menu could be scripted by a workaround using the "Shell.Application" object verbs that effectively called the “Pin to Start Menu” that was seen by clicking with a right-mouse button on a file.  The Windows 7 Start menu uses different technology to the Windows 8 Start screen so the name of the former verb has been stripped.

... gone completely!

In theory, to create Windows Start tiles developers (and system administrators) must develop to the AppX guidelines and use AppX XML manifests.  As Microsoft are trying to accomodate a broader device range (ie phones, tablets, tvs and PCs) with the same display, applications need to be more dynamic with the way they are presented.  Instead of the age-old-standard of 32x32 pixel images used with shortcuts, the new tiles require larger images to display correctly with tiles. 

AppX suggests that developers have at least two sizes of image used for icons –

  • 30x30 for small icons
  • 150x150 for tiles (310 x 150 for wide tiles)

Windows 8 Start Menu tiles represent “Application” objects from windows.ui.xaml.dll.  The example below if from Microsoft and demonstrates the attributes required for an Application object to be created.

          Version="1.0.0.0"

          Publisher="CN=MyCompany, O=MyCompany, L=MyCity, S=MyState, C=MyCountry">

  MyApp

  MyCompany

  images\icon.png

 

   

        DisplayName="My App"

        Description="A useful description."

        Logo="images\icon.png"

        SmallLogo="images\small_icon.png"

        ForegroundText="dark"

        BackgroundColor="#FFFFFF" >

   

 

Developers can always take advantage of the AppX standard to create proper Start Menu tiles for their applications but it doesnt help administrators who oversee hundreds of legacy applications.  Because of the new application requirements, Microsoft tried to put a line in the sand so older Win32 application couldn’t be automatically added to the new Metro styled interface.  That has recently changed with the release of Windows 8.1.

Microsoft does allow:

Firstly, with Powershell 5 (included with Windows 8.1) Windows Enterprise edition can export and import the layout of the Start menu using powershell cmdlets.  Administrators can rearrange the tiles the way they like and export the layout into a binary with the command:

      Export-StartLayout -Path "C:\Test\DefaultLayout.bin" -As BIN

      The layout can be imported into an offline (or running) session with the command:

      Import-StartLayout -LayoutPath "C:\Test\ DefaultLayout.bin" -MountPath "C:\" 

     This renames the binary file to appsFolderLayout.bin as the default layout for all users:

      C:\Users\Default\AppData\Local\Microsoft\appsFolderLayout.bin

Also note that App-V 5.0 has been quietly altered to now produce AppxManifest.xml files that support the AppX standard!

 

Options for adding Start Menu Tiles

There are a couple of options for programmatically adding applications to the Windows 8 Start Screen. 

OblyTitle

The first option is by using a wrapper such as the freeware utility OblyTile. OblyTile creates a local folder for each added application which contains Icon Images and a launcher that runs the application specified. 

The utility can be run from the command-line to automate the creation of tiles with legacy applications.  The syntax is:

     OblyTile.exe "AppName"  "Program Path"  "Tile Image Location" "Small Tile Image Location"

Other command line options can also be used.  The benefit of using Oblytile is that custom graphics can be specified for use with Start tiles.

Windows 8.1 Group Policy

A brand new Group Policy Setting for Windows 8.1 allows specifically identified applications to be elevated to the Start page if they are installed.   This policy setting maybe found under “C:\Windows\PolicyDefinitions” in the file StartMenu.admx

Windows 8.1 has introduced 5 new Start Menu Group Policies in relation to the Windows 8 Start Menu

  • StartPinAppsWhenInstalled
  • LockedStartLayout
  • GotoDesktopOnSignin
  • ShowAppsViewOnStart
  • DisableGlobalSearchOnAppsView

Of most relevance in a corporate environment is StartPinAppsWhenInstalled which is an Administrative Template.

With this example, I want the program Ifranview to appear on the Start Menu whenever it’s installed.

The AppID attribute for particular applications may be gleaned by using powershell to export the Start Menu to xml

Eg.

Export-StartLayout -Path "C:\Test\DefaultLayout.xml" -As XML

The AppID may be retrieved from within the exported StartLayout XML.

Note that Ifranview has the AppID:

     {7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\IrfanView\i_view32.exe

Many of the AppIDs have namespaces (like Microsoft.Windows.RemoteDesktop) that we might expect to see in an AppX Manifest but the Ifranview AppID is different.  It represents a file system location.

In this instance,

     {7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\IrfanView\i_view32.exe

Is the same as…

    C:\Program Files (x86)\IrfanView\ i_view32.exe

Windows now uses “Known Folder ID’s” which are an evolution from the earlier CSIDL folders used in mapping an alias to a physical file location on a local drive.  {7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E} represents the 32bit program files folder.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd378457(v=vs.85).aspx

By building a list of priority applications and recording their respective AppIDs, Group Policy provides a method for organisational control of which tiles are displayed on the Windows 8.1 start menu.

Useful AppIDs

Microsoft.SoftwareCenter.DesktopToasts SCCM Software Center
Microsoft.Windows.Explorer Windows Explorer
{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\SnippingTool.exe Snipping Tool

Note: Jason Ragasa has released “applications” that provide power shortcut tiles for Windows 8.  These may be used along with the new Windows 8.1 Group Policy settings to put shutdown, logoff and lock automatically on the Windows 8.1 Start Screen.  They may be downloaded at the following URL:

http://blog.jaysonragasa.net/blog/post/2012/06/17/Windows-8-System-Power-Shortcuts.aspx

Microsoft.AutoGenerated.{89B6E0C3-9FC0-3FD0-41CB-27CB0929D561} Shutdown
Microsoft.AutoGenerated.{6AD6EBC8-DD20-B40D-662A-6E68289E9E59} Logoff
Microsoft.AutoGenerated.{16EEF64A-DEC6-2F83-9DA7-ECF7112F567C} Lock

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MDT 2013

http://go.microsoft.com/fwlink/?LinkId=325278

 

Windows ADK 8.1

http://www.microsoft.com/en-us/download/details.aspx?id=39982

 

 

Tags