I have created a baseline for my windows 10 deployments which sets the StartMenu to a default layout. (I had to make it a baseline due to some internal politics so don't ask :-) .)
This baseline creates a XML file with the data captured from a previous Startmenu export via Powershell. The script works and does what its supposed to do without issue. But when I log on with a new account the start menu is missing the IE tile. The script creates the missing shortcut at "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs" as I have read on a few other pages is needed. But that fix does not appear to be working for me.
This script also removes the windows 10 welcome video for new users.
This is the script:
$key = "\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
$filecontent = @"
<LayoutModificationTemplate Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
<LayoutOptions StartTileGroupCellWidth="6" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout">
<start:Group Name="General Apps" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
<start:Tile Size="1x1" Column="2" Row="1" AppUserModelID="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge" />
<start:Tile Size="1x1" Column="3" Row="1" AppUserModelID="Microsoft.Windows.Cortana_cw5n1h2txyewy!CortanaUI" />
<start:DesktopApplicationTile Size="1x1" Column="2" Row="0" DesktopApplicationID="Microsoft.SoftwareCenter.DesktopToasts" />
<start:Tile Size="1x1" Column="4" Row="1" AppUserModelID="Microsoft.WindowsStore_8wekyb3d8bbwe!App" />
<start:DesktopApplicationTile Size="1x1" Column="4" Row="0" DesktopApplicationID="{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\SnippingTool.exe" />
<start:Tile Size="1x1" Column="5" Row="0" AppUserModelID="Microsoft.People_8wekyb3d8bbwe!x4c7a3b7dy2188y46d4ya362y19ac5a5805e5x" />
<start:Tile Size="1x1" Column="3" Row="0" AppUserModelID="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
<start:DesktopApplicationTile Size="1x1" Column="0" Row="0" DesktopApplicationID="Microsoft.InternetExplorer.Default" />
</start:Group>
<start:Group Name="" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
<start:Tile Size="2x2" Column="0" Row="0" AppUserModelID="Microsoft.BingWeather_8wekyb3d8bbwe!App" />
<start:Tile Size="2x2" Column="2" Row="0" AppUserModelID="Microsoft.BingNews_8wekyb3d8bbwe!AppexNews" />
</start:Group>
<start:Group Name="Remote Tools" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationID="Microsoft.Windows.RemoteDesktop" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationID="Juniper.Junos Pulse.UserInterface" />
</start:Group>
<start:Group Name="" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationID="Microsoft.Office.OUTLOOK.EXE.15" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationID="Microsoft.Office.WINWORD.EXE.15" />
<start:DesktopApplicationTile Size="2x2" Column="4" Row="0" DesktopApplicationID="Microsoft.Office.EXCEL.EXE.15" />
<start:DesktopApplicationTile Size="2x2" Column="0" Row="2" DesktopApplicationID="Microsoft.Office.lync.exe.15" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="2" DesktopApplicationID="Microsoft.Office.ONENOTE.EXE.15" />
<start:DesktopApplicationTile Size="2x2" Column="4" Row="2" DesktopApplicationID="Microsoft.Office.POWERPNT.EXE.15" />
</start:Group>
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>
"@
<# Remove Weclome Video #>
$res = Get-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE$key -name EnableFirstLogonAnimation -ErrorAction SilentlyContinue
if (-not $res)
{New-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE$key -name EnableFirstLogonAnimation -value "0" -PropertyType "DWord"}
else
{Set-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE$key -name EnableFirstLogonAnimation -value "0"}
<# Load XML Data #>
New-Item $env:ProgramData\testing\menulayout -ItemType directory
echo $filecontent |out-file $env:ProgramData\lmco\menulayout\LayoutModification.xml
Import-StartLayout -LayoutPath $env:ProgramData\lmco\menulayout\LayoutModification.xml -MountPath $env:SystemDrive\
<# Add IE Shorcut #>
$TargetFile = "C:\Program Files\Internet Explorer\iexplore.exe"
$ShortcutFile = "$env:ALLUSERSPROFILE\Microsoft\Windows\Start Menu\Programs\Internet Explorer 11.lnk"
$WScriptShell = New-Object -ComObject WScript.Shell
$Shortcut = $WScriptShell.CreateShortcut($ShortcutFile)
$Shortcut.TargetPath = $TargetFile
$Shortcut.Save()
<# Cleanup #>
Remove-Item $env:ProgramData\testing\menulayout -Recurse -Force
Just wanted to know if someone could test this and see if they get the same result. Or even if anyone has found how to get the Missing Tiles to show.
If I set the tile to be a hard linked Shortcut using something like <start:DesktopApplicationTile Size="1x1" Column="0" Row="0" DesktopApplicationID="%appdata%\Microsoft\Windows\Start Menu\Programs\Internet Explorer.lnk" />
I end up breaking the startmenu for the user entirely.
I have also found that occasionally the Store Tile disappears from the start when I make changes to the IE line only so I am getting some strange results.
Also When I run an export-startlayout on the user just logged on I can see that the startmenu xml has no record of the missing tiles.
And I have also tried this with using the actual XML file to import and I get the same result running the 2 lines by hand.
This is the Final version of the script. Ended up not using it sadly but it was nice to get it working.
<# Detect Office Version #>
$office2013 = (Get-ItemProperty "HKLM:\Software\Microsoft\Office\15.0\Outlook" -ErrorAction SilentlyContinue)
$office2016 = (Get-ItemProperty "HKLM:\Software\Microsoft\Office\16.0\Outlook" -ErrorAction SilentlyContinue)
if($office2013) {$officeversion = "2013"}
if($office2016) {$officeversion = "2016"}
<# Reg Values #>
$key = "\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
<# XML Data 2016 #>
if ($officeversion -eq 2016) {
$filecontent = @"
<LayoutModificationTemplate Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
<LayoutOptions StartTileGroupCellWidth="6" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout">
<start:Group Name="General Apps" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
<start:Tile Size="1x1" Column="2" Row="1" AppUserModelID="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge" />
<start:Tile Size="1x1" Column="3" Row="1" AppUserModelID="Microsoft.Windows.Cortana_cw5n1h2txyewy!CortanaUI" />
<start:DesktopApplicationTile Size="1x1" Column="2" Row="0" DesktopApplicationID="Microsoft.SoftwareCenter.DesktopToasts" />
<start:Tile Size="1x1" Column="4" Row="1" AppUserModelID="Microsoft.WindowsStore_8wekyb3d8bbwe!App" />
<start:DesktopApplicationTile Size="1x1" Column="4" Row="0" DesktopApplicationID="{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\SnippingTool.exe" />
<start:Tile Size="1x1" Column="5" Row="0" AppUserModelID="Microsoft.People_8wekyb3d8bbwe!x4c7a3b7dy2188y46d4ya362y19ac5a5805e5x" />
<start:Tile Size="1x1" Column="3" Row="0" AppUserModelID="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationID="{6D809377-6AF0-444B-8957-A3773F02200E}\Internet Explorer\iexplore.exe" />
</start:Group>
<start:Group Name="" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
<start:Tile Size="2x2" Column="0" Row="0" AppUserModelID="Microsoft.BingWeather_8wekyb3d8bbwe!App" />
<start:Tile Size="2x2" Column="2" Row="0" AppUserModelID="Microsoft.BingNews_8wekyb3d8bbwe!AppexNews" />
</start:Group>
<start:Group Name="Remote Tools" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationID="Microsoft.Windows.RemoteDesktop" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationID="Juniper.Junos Pulse.UserInterface" />
</start:Group>
<start:Group Name="" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationID="Microsoft.Office.OUTLOOK.EXE.15" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationID="Microsoft.Office.WINWORD.EXE.15" />
<start:DesktopApplicationTile Size="2x2" Column="4" Row="0" DesktopApplicationID="Microsoft.Office.EXCEL.EXE.15" />
<start:DesktopApplicationTile Size="2x2" Column="0" Row="2" DesktopApplicationID="Microsoft.Office.lync.exe.15" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="2" DesktopApplicationID="Microsoft.Office.ONENOTE.EXE.15" />
<start:DesktopApplicationTile Size="2x2" Column="4" Row="2" DesktopApplicationID="Microsoft.Office.POWERPNT.EXE.15" />
</start:Group>
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>
"@
}
<# XML Data 2013 #>
if ($officeversion -eq 2013) {
$filecontent = @"
<LayoutModificationTemplate Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
<LayoutOptions StartTileGroupCellWidth="6" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout">
<start:Group Name="General Apps" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
<start:Tile Size="1x1" Column="2" Row="1" AppUserModelID="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge" />
<start:Tile Size="1x1" Column="3" Row="1" AppUserModelID="Microsoft.Windows.Cortana_cw5n1h2txyewy!CortanaUI" />
<start:DesktopApplicationTile Size="1x1" Column="2" Row="0" DesktopApplicationID="Microsoft.SoftwareCenter.DesktopToasts" />
<start:Tile Size="1x1" Column="4" Row="1" AppUserModelID="Microsoft.WindowsStore_8wekyb3d8bbwe!App" />
<start:DesktopApplicationTile Size="1x1" Column="4" Row="0" DesktopApplicationID="{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\SnippingTool.exe" />
<start:Tile Size="1x1" Column="5" Row="0" AppUserModelID="Microsoft.People_8wekyb3d8bbwe!x4c7a3b7dy2188y46d4ya362y19ac5a5805e5x" />
<start:Tile Size="1x1" Column="3" Row="0" AppUserModelID="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationID="{6D809377-6AF0-444B-8957-A3773F02200E}\Internet Explorer\iexplore.exe" />
</start:Group>
<start:Group Name="" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
<start:Tile Size="2x2" Column="0" Row="0" AppUserModelID="Microsoft.BingWeather_8wekyb3d8bbwe!App" />
<start:Tile Size="2x2" Column="2" Row="0" AppUserModelID="Microsoft.BingNews_8wekyb3d8bbwe!AppexNews" />
</start:Group>
<start:Group Name="Remote Tools" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationID="Microsoft.Windows.RemoteDesktop" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationID="Juniper.Junos Pulse.UserInterface" />
</start:Group>
<start:Group Name="" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationID="Microsoft.Office.OUTLOOK.EXE.15" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationID="{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\Microsoft Office\Office15\WINWORD.EXE" />
<start:DesktopApplicationTile Size="2x2" Column="4" Row="0" DesktopApplicationID="{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\Microsoft Office\Office15\EXCEL.EXE" />
<start:DesktopApplicationTile Size="2x2" Column="0" Row="2" DesktopApplicationID="{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\Microsoft Office\Office15\lync.exe" />
<start:DesktopApplicationTile Size="2x2" Column="4" Row="2" DesktopApplicationID="{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\Microsoft Office\Office15\POWERPNT.EXE" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="2" DesktopApplicationID="{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\Microsoft Office\Office15\ONENOTE.EXE" />
</start:Group>
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>
"@
}
<# Remove Weclome Video #>
$res = Get-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE$key -name EnableFirstLogonAnimation -ErrorAction SilentlyContinue
if (-not $res)
{New-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE$key -name EnableFirstLogonAnimation -value "0" -PropertyType "DWord"}
else
{Set-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE$key -name EnableFirstLogonAnimation -value "0"}
<# Load XML Data #>
$folderexist = (test-path $env:ProgramData\lmco\)
if ($folderexist)
{New-Item $env:ProgramData\lmco\menulayout -ItemType directory}
else
{New-Item $env:ProgramData\LMCO\ -ItemType directory; New-Item $env:ProgramData\lmco\menulayout -ItemType directory}
echo $filecontent |out-file $env:ProgramData\lmco\menulayout\LayoutModification.xml
Import-StartLayout -LayoutPath $env:ProgramData\lmco\menulayout\LayoutModification.xml -MountPath $env:SystemDrive\
<# Add IE Shorcut #>
$TargetFile = "C:\Program Files\Internet Explorer\iexplore.exe"
$ShortcutFile = "$env:ALLUSERSPROFILE\Microsoft\Windows\Start Menu\Programs\Internet Explorer.lnk"
$WScriptShell = New-Object -ComObject WScript.Shell
$Shortcut = $WScriptShell.CreateShortcut($ShortcutFile)
$Shortcut.TargetPath = $TargetFile
$Shortcut.Save()
<# Cleanup #>
Remove-Item $env:ProgramData\lmco\menulayout -Recurse -Force
I had some problems with IE in an application myself. As far as I found out Microsoft.InternetExplorer.Default does not seem to work and while some guides say Microsoft.Explorer.Default would work for IE this goes back to a typo in one of the original technet articles. I got it to work using a captured non-generic AppID which was
{6D809377-6AF0-444B-8957-A3773F02200E}\Internet Explorer\iexplore.exe
for 64Bit and
{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\Internet Explorer\iexplore.exe
for 32Bit. You can get this ID with the Powershell Command 'Get-StartApps' for all possible programs so:
Get-StartApps | where {$_.Name -ilike 'Internet Explorer*'}
To Get just IE if it ever breaks. As you can see here those are GUIDs for the ProgramFilesx64 and x86 Folder. There is also a generic one for ProgramFiles ({905E63B6-C1BF-494E-B29C-65B732D3D21A}) but as it is not listed with Get-StartApps it would probably not work.
However first this solution does not work across x64 and x86 windows with one file and second to me it seems like it might break at some point. This is not super likely as the IDs are present since vista and changing a GUID would break a lot of compatibility but still I'd rather not rely on a more obscure method as long as there is an alternative.
I therefore settled for the solution with the lnk file. If you do that however you cannot use the DesktopApplicationID
anymore, but instead DesktopApplicationLinkPath
. The correct syntax should be:
<start:DesktopApplicationTile Size="1x1" Column="0" Row="0" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\Internet Explorer.lnk" />