Import-StartLayout

I don’t know if it’s because of my dumb luck, or what, but I cannot get this to work. Here’s what I did:

On Windows 10 (17134) machine, launched PowerShell ISE, and ran:

[pre]Export-StartLayout -Path “…\Desktop\LayoutModification.xml” [/pre]

Once that was done, I cracked it open in VS Code (as that has become default editor of all things, it appears), and added the following to the “LayoutModificationTemplate” tag:

[pre]xmlns:taskbar=“http://schemas.microsoft.com/Start/2014/TaskbarLayout”[/pre]

Then, I left the entire Start Menu section alone, and added the Taskbar section:

[pre]<CustomTaskbarLayoutCollection PinListPlacement=“Replace”>
<defaultLayout:TaskbarLayout>
<taskbar:TaskbarPinList>
<taskbar:DesktopApp DesktopApplicationLinkPath=“C:\Windows\system32\SnippingTool.exe” />
<taskbar:UWA AppUserModelID=“Microsoft.WindowsCalculator_8wekyb3d8bbwe!App” />
<taskbar:DesktopApp DesktopApplicationLinkPath=“C:\Windows\explorer.exe shell:::{20D04FE0-3AEA-1069-A2D8-0800DB30309D}” />
<taskbar:DesktopApp DesktopApplicationLinkPath=“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” />
<taskbar:UWA AppUserModelID=“Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge” />
<taskbar:DesktopApp DesktopApplicationLinkPath=“C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE” />
<taskbar:DesktopApp DesktopApplicationLinkPath=“C:\Program Files (x86)\Microsoft Office\root\Office16\WINWORD.EXE” />
<taskbar:UWA AppUserModelID=“Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe!App” />
</taskbar:TaskbarPinList>
</defaultLayout:TaskbarLayout>
</CustomTaskbarLayoutCollection>[/pre]

Then, with my newly saved LayoutModification.xml, I went back to PowerShell ISE, and ran the following:

[pre]Import-StartLayout -LayoutPath “…\Desktop\LayoutModification.xml” -MountPath “C:”[/pre]

No dice. Says that the file is not a valid layout file. So, I did some googling of the issue, and noticed some people finding success in changing the exported file format from xml to bin. So, I rinsed and repeated (this time with .bin).

No dice. Says that the file is not a valid layout file. So, I did some more googling of the issue, and found someone who said they were finally able to get it to work after going through all the Start Menu items, and moving the “Size=’#x#’ Column=’#’ Row=’#’” to behind the “DesktopApplicationLinkPath=’…’”. So, I promptly did that.

No dice. Says that the file is not a valid layout file. After even more googling, and seeing even more insane methods people have used to successfully fix this issue, I figured I might have better luck asking people who have extensive knowledge of PowerShell. So, I googled that. I saw a website called “powershell.org” and thought “If ever there was a place to find people who have extensive knowledge of PowerShell…”

And so here I am - lost, frustrated, weary from my fruitless travels through the Google-sphere, and…you know, I’m not ashamed to admit…a little scared. Scared I may never get this to work. Scared of the feelings of inadequacy that might result. Scared I’ll go the rest of my life without ever knowing why this isn’t working. It’s been a very emotional scripting journey.

Of course you will see awesome PowerShell monks here and everyone will help each other.

did you find below result in you googling ?
https://msfn.org/board/topic/174369-windows-10-start-menu-layout-exportbackupimport/

I’m not seeing the code or XML you’re listing for the taskbar section? It’s showing up blank for me.

Xml doesn’t work here. He’s have to share it from gist.

I ran into this problem architecting our Windows 10 image. There are 2 updates that have installed that breaks the process and generates the corruption error. Remove KB4093112 and KB4099989 export your layout and then reinstall them.

Remember you should be importing that layout in sysprep audit mode to apply to all new profiles.

Let me know how it goes.

 

Sysprep audit mode? Now I’m definitely out of my depths. Can audit mode be turned on/off whenever, or does it need to be done at a certain point? Specifically, would it be something that could be done via a logon script?

Sorry for the late reply, had a bit of an unexpected life-hiccup.

Also, should the Import also be performed prior to the reinstallation of the 2 Windows Updates, or just the Export?

Thanks again!

I wrote something about this a while ago, https://windowsserveressentials.com/2018/03/08/customising-the-windows-10-taskbar/

If it is saying your XML is invalid - try opening the XML in a Web Browser as it is often (for me) easier to see where the formatting has gone awry.

[quote quote=128172]I wrote something about this a while ago, https://windowsserveressentials.com/2018/03/08/customising-the-windows-10-taskbar/

If it is saying your XML is invalid – try opening the XML in a Web Browser as it is often (for me) easier to see where the formatting has gone awry.

[/quote]

In your article, you advise placing the .XML file in [pre]c:\users\default\local\appdata\microsoft\windows\shell[/pre] - as opposed to running the [pre]Import-StartLayout[/pre] command. I don’t know how I didn’t come across this method before, but I like it a lot better. Checking the date, I assume it was written/confirmed with 1703/9, have you encountered any issues with this method in 1803/9?

Thanks! I’m going to try this ASAP

Fairly sure it is still working without issue.