none
Pinned Items on Start Menu Before/After Sysprep RRS feed

  • Question

  • MDT 2013 Update 2. If I pin more than three items to the start menu it does not retain its layout after I sysprep! I currently have 10 items pinned and upon sysprep and deployment of Windows 10 the tiles are ALL over the place.

    Am I doing something wrong?

    Thursday, August 4, 2016 6:45 PM

Answers

  • What I've taken to doing with Windows 10 is exporting the start menu layout and later importing it during deployment.

    Design the start menu the way you want and use the following command to export the layout.

    powershell Export-StartLayout -Path C:\Users\Administrator\Desktop\LayoutModification.xml

    The advantage to doing it this way, is that you never have to build a new image just to change your layout.

    I wrote a script to import the XML file during deployment. Below is a snippet from it:

    oFSO.CopyFile oUtility.ScriptDir & "\LayoutModification.xml", sSysDrive & "\users\default\appdata\local\Microsoft\Windows\Shell\", True

    While you won't see the changes in the Administrator profile, any new user that logs in will see the layout you designed. If you really want the administrator account to have the same layout, you could import it into the image offline.

    To do that:

    dism /mount-image /imagefile:"C:\DeploymentShare\Captures\win10x64.wim" /index:1 /mountdir:c:\mount powershell Import-StartLayout -LayoutPath "C:\Layout\WIN10x64\LayoutModification.xml" -MountPath "C:\Mount"

    dism /unmount-image /mountdir:c:\mount /commit



    If this post is helpful please vote it as Helpful or click Mark for answer.


    Thursday, August 4, 2016 7:33 PM
  • Thanks Dan. With your guidance I did the following.

    Exported the layoutmodification.xml on my reference image via powershell

    powershell Export-StartLayout -Path C:\Users\Administrator\Desktop\LayoutModification.xml

    Added two command lines to my TS.

    1. Copy the XML file

    xcopy /y "%SCRIPTROOT%\LayoutModification.xml" "C:\Users\Default\AppData\Local\Microsoft\Windows\Shell"

    2. Remove the TileDataLater Folder

    cmd /c rmdir "C:\Users\Default\AppData\Local\TileDataLayer" /q /s

    I am running Windows 10 LTSB Enterprise and the above steps worked for me. Every new user now has the start menu as shown in the reference image!

    Tuesday, August 9, 2016 12:33 PM

All replies

  • What I've taken to doing with Windows 10 is exporting the start menu layout and later importing it during deployment.

    Design the start menu the way you want and use the following command to export the layout.

    powershell Export-StartLayout -Path C:\Users\Administrator\Desktop\LayoutModification.xml

    The advantage to doing it this way, is that you never have to build a new image just to change your layout.

    I wrote a script to import the XML file during deployment. Below is a snippet from it:

    oFSO.CopyFile oUtility.ScriptDir & "\LayoutModification.xml", sSysDrive & "\users\default\appdata\local\Microsoft\Windows\Shell\", True

    While you won't see the changes in the Administrator profile, any new user that logs in will see the layout you designed. If you really want the administrator account to have the same layout, you could import it into the image offline.

    To do that:

    dism /mount-image /imagefile:"C:\DeploymentShare\Captures\win10x64.wim" /index:1 /mountdir:c:\mount powershell Import-StartLayout -LayoutPath "C:\Layout\WIN10x64\LayoutModification.xml" -MountPath "C:\Mount"

    dism /unmount-image /mountdir:c:\mount /commit



    If this post is helpful please vote it as Helpful or click Mark for answer.


    Thursday, August 4, 2016 7:33 PM
  • Great! I will try it either today or tomorrow. When should I import it back in my TS? During what step?

    A screenshot would be helpful. Thanks for your time!

    Thursday, August 4, 2016 7:36 PM
  • Here's what I've done that works with Windows 10 v1511. I am just starting to build a v1607 image, so I haven't tested it out yet.


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Thursday, August 4, 2016 8:26 PM
  • Thanks Dan. With your guidance I did the following.

    Exported the layoutmodification.xml on my reference image via powershell

    powershell Export-StartLayout -Path C:\Users\Administrator\Desktop\LayoutModification.xml

    Added two command lines to my TS.

    1. Copy the XML file

    xcopy /y "%SCRIPTROOT%\LayoutModification.xml" "C:\Users\Default\AppData\Local\Microsoft\Windows\Shell"

    2. Remove the TileDataLater Folder

    cmd /c rmdir "C:\Users\Default\AppData\Local\TileDataLayer" /q /s

    I am running Windows 10 LTSB Enterprise and the above steps worked for me. Every new user now has the start menu as shown in the reference image!

    Tuesday, August 9, 2016 12:33 PM
  • Can this be done on a VM where an alternative user is the only user on the machine, but has admin rights? I do not sign onto my VM's as administrator, but a different one which has the same authority to the VM.
    Thanks
    I guess the command would then be
    powershell Export-StartLayout -Path C:\Users\"authorized-alternative user"\Desktop\LayoutModification.xml
    Friday, September 9, 2016 2:00 PM
  • Sure thing, you do not have to be logged in as administrator to design and export the layout.

    If this post is helpful please vote it as Helpful or click Mark for answer.

    Friday, September 9, 2016 2:06 PM
  • Thanks. I've tried this already and it doesn't apply. Where is the best place to put the xml on my MDT server? I'm not any good at shortcuts like %scriptroot% etc.
    I did attempt to copy this and my copy or xcopy fail so I went with robocopy and that seemed to move the xml but never did apply the changes. I see most posts copying the file to the windows\shell folder but MS told me to copy it to

    C:\users\default\APPDATA\Microsoft\Windows\Start Menu\Programs\ so I remain confused :/

    Friday, September 9, 2016 2:10 PM
  • I have my layoutmodification.xml in the scripts folder on my deploymentshare..

    TS step: xcopy /y "%SCRIPTROOT%\LayoutModification.xml" "C:\Users\Default\AppData\Local\Microsoft\Windows\Shell"

    Friday, September 9, 2016 2:16 PM
  • I use a vbscript, how did you want to accomplish this? Either way you'll want to copy it to the Shell folder.

    VBscipt (imported as an application) with layout file in the same folder

    ' Replace existing layout file
    Wscript.Echo " Applying Standard Layout Modification "
    
    oFSO.CopyFile oUtility.ScriptDir & "\LayoutModification.xml", sSysDrive & "\users\default\appdata\local\Microsoft\Windows\Shell\", True

    Batch file (imported as an application) with layout file in the same folder

    xcopy *.xml %systemdrive%\users\default\appdata\local\Microsoft\Windows\Shell


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Friday, September 9, 2016 2:26 PM
  • I ran a command in my TS which was the xcopy /y "%SCRIPTROOT%....
    but it hangs. It never moved beyond that point so I had to kill it. Any ideas?
    Friday, September 9, 2016 3:44 PM
  • If you're going to do it like that I'd suggest using a command line of

    cmd /c xcopy /y "%SCRIPTROOT%\LayoutModification.xml" "C:\Users\Default\AppData\Local\Microsoft\Windows\Shell"


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Friday, September 9, 2016 4:26 PM
  • Dan I will try the vbs and see how it goes. You have the xml in your scriptroot folder when you run this, and just add a vbs ts step in MDT? Since there already is a default layout in C: I don't need to remove that? I'm not sure what the other person was removing from the TileDataLayer but when I removed that, every one of my tiles was gone. I'll test putting the xml in my scriptroot folder, making a vbs (from a text file I'm guessing). Where do you store the vbs? In the same script folder as the xml?
    Friday, September 9, 2016 5:57 PM
  • It's up to you, but in this instance I imported my script as an application. The imported folder contains the script and the XML file.

    Then in my task sequence I just add an Install application task and choose this app.

    Here's my full script which also creates a log:

    <job id="Standard Layout">
    <script language="VBScript" src="..\..\scripts\ZTIUtility.vbs"/>
    <script language="VBScript"> 
    
    '//----------------------------------------------------------------------------
    '// Purpose: Used to apply Start menu layout for Standard devices
    '// Usage: cscript Layout.wsf [/debug:true]
    '// Version: 1.0 - October 23, 2015 - Daniel Vega: Initial script
    '//----------------------------------------------------------------------------
    
    '//----------------------------------------------------------------------------
    '// Global constant and variable declarations
    '//---------------------------------------------------------------------------- 
    
    Option Explicit 
    
    Dim iRetVal 
    Dim sSysDrive
    Dim Choice
    
    sSysDrive = oShell.ExpandEnvironmentStrings("%SYSTEMDRIVE%")
    
    '//----------------------------------------------------------------------------
    '// End declarations
    '//---------------------------------------------------------------------------- 
    
    '//----------------------------------------------------------------------------
    '// Main routine
    '//---------------------------------------------------------------------------- 
    
    On Error Resume Next
    iRetVal = ZTIProcess
    ProcessResults iRetVal
    On Error Goto 0 
    
    '//---------------------------------------------------------------------------
    '//
    '// Function: ZTIProcess()
    '//
    '// Input: None
    '// 
    '// Return: Success - 0
    '// Failure - non-zero
    '//
    '// Purpose: Perform main ZTI processing
    '// 
    '//---------------------------------------------------------------------------
    Function ZTIProcess() 
    
    
    	oLogging.CreateEntry "Standard Layout: Applying Layout Modification", LogTypeInfo	
    
    
    	' Replace existing layout file
    	Wscript.Echo " Applying Standard Layout Modification "
    	oFSO.CopyFile oUtility.ScriptDir & "\LayoutModification.xml", sSysDrive & "\users\default\appdata\local\Microsoft\Windows\Shell\", True
    
    
    	oLogging.CreateEntry "Standard Layout: Finished applying layout", LogTypeInfo	
    	
    End Function 
    
    </script>
    </job>


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Friday, September 9, 2016 6:26 PM
  • Thanks. I guess I'm not wise enough on the vbs scripting. I'm testing this method now. My question is, what do you mean by stating that the imported folder contains the xml and the script?
    You're running the wsf script as an MDT install, so do you mean it is not a single application but a bundle containing the wsf and the xml?
    • Edited by the1rickster Friday, September 9, 2016 7:51 PM clearer question
    Friday, September 9, 2016 7:12 PM
  • I use that in all my scripts, it makes reference to the ZTIUtility file in order to make use of functions or variables that have already been declared in ZTIUtility.

    That's why my script can use things like "oLogging.CreateEntry" without having to declare it at the beginning of the script.


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Friday, September 9, 2016 7:20 PM
  • What I mean by my question is...what folder are you referring to, when talking about the imported folder? All I did was make a text file with what you have above, saved it as a wsf file, imported it as an application, and moved my xml into my deployshare\scripts folder. I believe it's not working because I don't have things in the proper place.
    wsf file from above is imported as an application (which the silent command of cscript.exe Layout.wsf, in an application folder called Standard Layout, while my xml is in my scripts folder. I don't know what else should be in a folder but this failed saying it cannot find the file.
    Friday, September 9, 2016 8:14 PM
  • It's failing because your layout.xml file needs to be in the same folder as your wsf file.

    I can see where the code might be confusing:

    oFSO.CopyFileoUtility.ScriptDir & "\LayoutModification.xml"

    This effectively translates to Copy file from working directory. It does not mean copy file from deploymentshare\Scripts. You might be thinking of the variable %SCRIPTROOT%, but it is easy to confuse that.


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Monday, September 12, 2016 1:33 PM
  • I see.
    When you import the application, you're only importing the wsf file by itself, as long as the xml is in the same folder, correct? Where do you store your folder and does it matter what it's called? Thanks!
    Monday, September 12, 2016 1:36 PM
  • I'll give you a rough step by step.

    Let's just say you create a folder on your desktop, you could even leave it called New Folder. Open notepad and copy and paste the code I provided. Save the file in the New Folder and call it Layout.wsf. Then you copy and paste the xml file you previously exported into the New Folder on your desktop. Open the Deployment Workbench. Go to Applications and click New application. Choose "Application with source files" and click next. In "Application Name" type Standard Layout and click next. Your Source directory will be the "New Folder" on your desktop (MDT will copy/move ALL the files that are in the folder you just chose) and you can choose to Move the files instead of copying them, if you want to. Your destination name could be Standard Layout. Command line "cscript layout.wsf" then just confirm and finish the import.


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Monday, September 12, 2016 2:06 PM
  • This is becoming an obsession! It copied and reported zero errors. Now in the Shell folder is the Layoutmodification xml and also a DefaultLayouts xml. Do I need to run a line to remove the Default one? Does your Shell show both xml files?
    When I sign on as me, I see the full batch of tiles displayed so nothing changed.
    Monday, September 12, 2016 2:23 PM
  • Yeah it's okay that both of those files are there. You'll only see the changes for new profiles (people that haven't logged in before), it won't modify the start menu for existing users.

    If this post is helpful please vote it as Helpful or click Mark for answer.

    Monday, September 12, 2016 2:35 PM
  • Yeah. I'm at a loss. I signed on as another user. I see the xml there, and all of the tiles. I may just say eh.....

    It is fine that I created the xml on a physical machine and not the VM I use as the base image, right?
    • Edited by the1rickster Monday, September 12, 2016 2:37 PM more
    Monday, September 12, 2016 2:36 PM
  • It really doesn't matter if you use a VM or not to create your layout, to be safe just make sure the version of Windows 10 matches. Also you need to understand that certain tiles will be empty if your layout included programs that aren't currently installed on the computer you apply the layout to.

    Try looking over this - https://blogs.technet.microsoft.com/deploymentguys/2016/03/07/windows-10-start-layout-customization/


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Monday, September 12, 2016 2:41 PM
  • I know the OS matches because I'm cloning a machine with 10240 version, then creating an xml on that machine. Then I'm moving that xml into MDT and applying it to that same Deploy TS. I can see my xml in the Shell folder but every tile MS wants to give, I still see.
    Monday, September 12, 2016 2:45 PM
  • Are you seeing the default tiles on new user accounts? You will see the Microsoft default tiles on the Administrator account because you're not applying the new layout until after the administrator profile has been generated and the imported layout will not affect existing profiles.

    If this post is helpful please vote it as Helpful or click Mark for answer.

    Monday, September 12, 2016 2:54 PM
  • I see all OS tiles (default, not mine) when signing on as someone else.
    To test this, I made changes on the admin start menu...changed to what I need to display. Rebooted, the tiles held. When I look in the Shell folder on the admin, it still shows defaultlayout and it has the original MS text in it. So since I made changes to the start menu, where did that store my changes? Not in the shell folder because I still see the original defaultlayout.xml file with original text.
    Monday, September 12, 2016 2:58 PM
  • I just created another xml, on a physical machine, moved it to the default shell folder, signed on as another user. Both default and my xmls are there, but it hasn't applied. I may put in a ticket with MS. It copies during deployment, its just not applying the changes.
    Monday, September 12, 2016 3:10 PM
  • That's not how your changes would work.

    Pretend DefaultLayouts.xml doesn't exist because you don't need to worry about that file. Your customized layout should be called "LayoutModification.xml". When a new user logs in and windows builds the profile, it will copy these files to the user's profile. Applying a customized layout in this fashion does not lock down the start menu and a user is free to modify the layout. That said making changes to the layout WILL NOT change the XML file, those changes are stored elsewhere. That said, I'm not sure where user changes are saved as they aren't in the same place they used to be.

    The way I made my layout was I first built a reference image (my ref image only includes Office) and then ran my normal deployment which then deploys a bunch of other apps, browsers, etc. I designed my layout to include tiles that are not in the reference image. I ran the command to export the start menu "powershell Export-StartLayout -Path C:\Users\Administrator\Desktop\LayoutModification.xml"

    Example:

    To test my changes I manually copied the layout file to the Shell folder and logged in as a new user. It worked fine so I then created the script to apply it during imaging. The other advantage to doing it like this is you can update the layout without having to build a new image.

    You might also want to look over this - Start layout for Windows 10


    If this post is helpful please vote it as Helpful or click Mark for answer.

    • Proposed as answer by the1rickster Monday, September 12, 2016 5:30 PM
    Monday, September 12, 2016 4:22 PM
  • I have done just what you posted. Ran powershell to create the LayoutModification.xml file. It is located exactly where the wsf file is which I created per script above. It copies the xml for other users, its just not applying. That's where I'm held up. Are there limited restrictions on the amount of tiles or where they can be? I am only putting about 7 tiles on the start menu.
    I copied the xml on a test machine, putting it in the default shell folder. When I sign on as other users, it copies the xml, just doesn't change a thing.
    Monday, September 12, 2016 4:54 PM
  • Sounds like you have another issue going on. You can see I made four groups and have more than seven tiles pinned in the layout I created. It ought to be pretty straight forward. Wish I could help more

    If this post is helpful please vote it as Helpful or click Mark for answer.

    Monday, September 12, 2016 5:08 PM
  • You've been more than a great help. Could it be the version of Windows? I doubt it. We are not moving forward to 1607 until Kaspersky comes up to date, so at this point I'm only using the base 10 OS.

    I'm also going to try the xcopy command from way up the thread. The wsf works; it copies the xml for each user, it just doesn't change the tile view at all. Using the xcopy from above, last week I tested it and removed the TileDataLayer and all of my tiles were gone! So, I may just put this whole thing on hold. Our AD group put a ticket in with MS as they cannot get a GPO to hold. MS suggested MDT and here we are! I'll post progress here, and thank you so far.

    Monday, September 12, 2016 5:13 PM
  • I have to add here....the xml copied AND applied by using the xcopy command, along with removing the TileDataLayer file. No idea why the vbs was not applying, it was copying. Glad it's working. Thank you for your help.
    Monday, September 12, 2016 5:30 PM